Grapejs hangs on plugin enable

Your software
My Mautic version is: 4.0
My PHP version is: 7.4
My Database type and version is: tidb

Your problem

In the config/plugin screen, i see a greyed-out GrapeJS.
I click it. The front-end hangs on ‘Loading’.

In the javascript console, i see:



i do not see any error come out in the log

I also don’t see grapejs themes when composing email.

 mautic router:match /s/plugins/config/grapejsbuilder

 [OK] Route "mautic_plugin_config" matches                                                                              

| Property     | Value                                                                      |
| Route Name   | mautic_plugin_config                                                       |
| Path         | /s/plugins/config/{name}/{page}                                            |
| Path Regex   | #^/s/plugins/config/(?P<name>[^/]++)(?:/(?P<page>\d+))?$#sD                |
| Host         | ANY                                                                        |
| Host Regex   |                                                                            |
| Scheme       | https                                                                      |
| Method       | ANY                                                                        |
| Requirements | page: \d+                                                                  |
| Class        | Symfony\Component\Routing\Route                                            |
| Defaults     | _controller: Mautic\PluginBundle\Controller\PluginController::configAction |
|              | page: 0                                                                    |
| Options      | compiler_class: Symfony\Component\Routing\RouteCompiler                    |

I’m not sure how to debug this.

Hi @donbowman
Are all the Grapesjs files available in the plugins folder? You can compare it to here:

should it match mautic/plugin-grapesjs-builder? or mautic/plugins/grapesjsbuilder? its in tree in 4.0 now.

i used the one in tree (e.g. installed from git clone mautic/mautic)

diff -qr reports as below. no missing files. some difference in the built css.

Files ./Assets/library/js/dist/builder.css and /app/plugins/GrapesJsBuilderBundle/Assets/library/js/dist/builder.css differ
Files ./Assets/library/js/dist/ and /app/plugins/GrapesJsBuilderBundle/Assets/library/js/dist/ differ
Files ./Assets/library/js/dist/builder.js and /app/plugins/GrapesJsBuilderBundle/Assets/library/js/dist/builder.js differ
Files ./Assets/library/js/dist/ and /app/plugins/GrapesJsBuilderBundle/Assets/library/js/dist/ differ
Files ./package-lock.json and /app/plugins/GrapesJsBuilderBundle/package-lock.json differ
Files ./package.json and /app/plugins/GrapesJsBuilderBundle/package.json differ

i have confirmed w/ strace that there are no ENOENT happening during the attempted load of this page (the plugin config).

the only difference between this (grapesjs) plugin and others that work I can see is the “Integration” directory: it has one, and e.g. MauticGmail does not.

update plugin_integration_settings set name = 'grapesjsbuilder' where name = 'GrapesJsBuilder';

there is a case-sensitivity issue.
when the plugin installs itself, it adds an entry to plugin_integration_settings w/ the UpperCase name, but, it looks for the lower - case name.

this resolves.