Email Menu will not open after 3.3.4 -> 4.0.2 upgrade

Your software. Ubuntu 20.4
My PHP version is : 7.4
My MySQL/MariaDB version is (delete as applicable): MariaDB version 10.5

Updating/Installing Errors
I am :Updating
Upgrading via : Command Line

These errors are showing in the installer : None

These errors are showing in the Mautic log : Post installation

mautic.CRITICAL: Uncaught PHP Exception Mautic\CoreBundle\Exception\BadConfigurationException: “Theme Newsletter not configured properly: builder property in the config.json” at /var/www/html/app/bundles/CoreBundle/Helper/ThemeHelper.php line 673 {“exception”:"[object] (Mautic\CoreBundle\Exception\BadConfigurationException(code: 0): Theme Newsletter not configured properly: builder property in the config.json at /var/www/html/app/bundles/CoreBundle/Helper/ThemeHelper.php:673)"}
[2021-11-22 18:28:08] mautic.ERROR: CAMPAIGN: blank-grapejs is missing a required config file

Your problem
My problem is : Email section is not available after upgrade 3.3.4 > 4.0.2 and the direct link is throwing a 500. Logs show the above error

Steps I have tried to fix the problem : Disable the GrapeJs plugin, reenable and clean cache

A long shot, but make sure the folders in cache have the right ownership now after cleaning it. For example might be root if you cleaned it as root, while it should be www-data. If you did update the ownership of the folder, make sure you did a recursive change on it.

Though if you have the wrong ownership you would not even be able to log in…

Yeah I did reapply permissions.

Hi, this is the culprit:

You need to go to your emails table in the DB and change the values in the column called template from “blank-grapejs” to blank.

How do I do that systematically?

With a mass update in mysql

Okay, will have to look into that at some point. I had to roll back to 3.3.4 Is this going to be fixed at all ?

Honestly: I don’t think so. The issue is, that you are using an abandoned template. If you update the template name, then it will be all good.
OR
Alternative is to modify the old template to be M4 compatible.
OR
You could download the blank. template, change the name in the config to the old template, and fool your system.

Hmmm I am not sure if I am using an old template since I built things in mjml. Will deleting all the emails/templates help solve the issue?

I’ve just wiped all the templates and emails then upgraded. Not necessarily the best solution but I it worked for me.

Hi, yeH it sucks but Im happy it worked out. Seems it was the template compatibility issue.
Every upgrade is hard with mautic, but I can feel how it’s getting less and less stressful.

I went back into the DB and changed all the correct items to “blank” but am still not getting any love from Mautic. Any other thoughts or should I just do a rollback and call it a day?

David

Did you make the change to the email configuration files? Just a thought: Email & Landing Page Builder | Mautic

Seems like the blank-grapejs theme might be missing a configuration file according to the error. Is there a config file in the theme directory? Maybe there’s something wonky with the theme.

All seems well! It looked like the ‘blank’ theme was also missing a config file. Then it became a firewall issue. Ah…the joys of a locked down VPS. Much thanks; I’ll spot check all the emails shortly.