GrapeJS builder won't save changes to landing pages (500 error on post / cookie SameSite setting Warnings in builder)

Running into a problem here…
Anyone else running into an issue with GrapeJS builder not saving changes to a landing page if you make too many before closing, hitting Apply, and then going back to the builder to continue? Not talking about having it open for a massive amount of time - even working on a page for a few minutes seems to cause this issue. If you close the builder and hit apply, it just hangs. The “Save and Close”, “Apply” etc buttons all stay grayed out and the progress bar above them just flashes and disappears. Then you have to refresh the page to try to edit and all the previous changes were lost/never saved. Anyone running into this?

  • LAMP
  • PHP 7.4.18
  • Mautic 3.3.3
  • Issue persists in both Chrome & Firefox
  • max post = 2G
  • Using Blank theme

Opening GrapeJS builder to edit the landing page produces this Warning in the console:

Some cookies are misusing the recommended “SameSite“ attribute 2
Cookie “__cfduid” has been rejected because it is in a cross-site context and its “SameSite” is “Lax” or “Strict”. rocket-loader.min.js
Cookie “__cfduid” has been rejected because it is in a cross-site context and its “SameSite” is “Lax” or “Strict”.

Making edits soon produces this Warning in the console:

Cookie “_gd1620747268286” will be soon rejected because it has the “SameSite” attribute set to “None” or an invalid value, without the “secure” attribute. To know more about the “SameSite“ attribute, read https://developer.mozilla.org/docs/Web/HTTP/Headers/Set-Cookie/SameSite froala_editor.js:1038:2273
Cookie “_gd1620747268286” will be soon rejected because it has the “SameSite” attribute set to “None” or an invalid value, without the “secure” attribute. To know more about the “SameSite“ attribute, read https://developer.mozilla.org/docs/Web/HTTP/Headers/Set-Cookie/SameSite froala_editor.js:1038:2321

Exiting the builder to save produces this Error in the console when clicking Apply or Save & Close:

    filename  	/s/pages/edit/1
mauticUserLastActive    	504
mauticLastNotificationId
	
Status500
Internal Server Error
Version   HTTP/2
Transferred   10.19 KB (9.46 KB size)
Referrer Policy   strict-origin-when-cross-origin

froala_editor seems to be the little WYSIWYG editor Grape uses for editing in text boxes. Is it possible GrapeJS has caught this issue and rolled out a patch that can be ported to this builder plugin? Or is it because Cloudflare’s rocket-loader is screwing up the cookie setting and it’s effecting everthing else in the builder?

Update:
We disabled Rocket Loader in Cloudflare to remove that as a possible source of the problem. The problem still persists with a 500 Error when trying to apply changes made in the builder.

Ultimately, I decided to disable to the GrapeJS builder plugin and I’m just going to code mode. Frustrating, but I can’t figure out the issue and I guess I’m hoping if it’s bug related that it will be resolved in Mautic 4.

What worries me, that it works for others.
So it might be connected with your environment.
Joey

1 Like

Yes, you may be right. I’ve disabled the plugin and still getting 500 errors on post. Something is up.

Now you’re talking.
I think you’ll have a permission error.

1 Like

That was my first thought but I reset all the permissions in the terminal using the info found here and it didn’t resolve the 500 error on post. I can otherwise post to the database just fine when creating and editing contacts, segments, etc. Seems like the error only occurs when trying to post something involving either builder.

Am I maybe missing a PHP module or is there any schema incompatibility with MariaDB 10.3?

A little more info:
If I paste my custom html into the “custom html” field in the database for the landing page using phpmyadmin, the changes are visible, in mautic when I preview the page, but now I can’t edit or save any change to that landing page in mautic – including just setting it to published.

When you paste the custom HTML - what is the first line?