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

**URL:** <https://forum.mautic.org/t/grapejs-builder-wont-save-changes-to-landing-pages-500-error-on-post-cookie-samesite-setting-warnings-in-builder/19418>\
**Category:** 3rd Party Addons\
**Created:** [May 11, 2021, 3:12pm UTC](https://forum.mautic.org/t/grapejs-builder-wont-save-changes-to-landing-pages-500-error-on-post-cookie-samesite-setting-warnings-in-builder/19418 "2021-05-11T15:12:46Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![brightworkcreative](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/brightworkcreative/32/1930_2.png) [@brightworkcreative](https://forum.mautic.org/u/brightworkcreative)\
**Post date:** [May 11, 2021, 3:12pm UTC](https://forum.mautic.org/t/grapejs-builder-wont-save-changes-to-landing-pages-500-error-on-post-cookie-samesite-setting-warnings-in-builder/19418/1 "2021-05-11T15:12:46Z")

</div>

**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?

---

<div class="post-metadata">

**Author:** ![brightworkcreative](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/brightworkcreative/32/1930_2.png) [@brightworkcreative](https://forum.mautic.org/u/brightworkcreative)\
**Post date:** [May 13, 2021, 1:07pm UTC](https://forum.mautic.org/t/grapejs-builder-wont-save-changes-to-landing-pages-500-error-on-post-cookie-samesite-setting-warnings-in-builder/19418/2 "2021-05-13T13:07:17Z")

</div>

**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.

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [May 13, 2021, 1:44pm UTC](https://forum.mautic.org/t/grapejs-builder-wont-save-changes-to-landing-pages-500-error-on-post-cookie-samesite-setting-warnings-in-builder/19418/3 "2021-05-13T13:44:25Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![brightworkcreative](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/brightworkcreative/32/1930_2.png) [@brightworkcreative](https://forum.mautic.org/u/brightworkcreative)\
**Post date:** [May 13, 2021, 3:12pm UTC](https://forum.mautic.org/t/grapejs-builder-wont-save-changes-to-landing-pages-500-error-on-post-cookie-samesite-setting-warnings-in-builder/19418/4 "2021-05-13T15:12:36Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [May 13, 2021, 4:38pm UTC](https://forum.mautic.org/t/grapejs-builder-wont-save-changes-to-landing-pages-500-error-on-post-cookie-samesite-setting-warnings-in-builder/19418/5 "2021-05-13T16:38:12Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![brightworkcreative](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/brightworkcreative/32/1930_2.png) [@brightworkcreative](https://forum.mautic.org/u/brightworkcreative)\
**Post date:** [May 18, 2021, 8:30pm UTC](https://forum.mautic.org/t/grapejs-builder-wont-save-changes-to-landing-pages-500-error-on-post-cookie-samesite-setting-warnings-in-builder/19418/6 "2021-05-18T20:30:50Z")

</div>

That was my first thought but I reset all the permissions in the terminal [using the info found here](https://docs.mautic.org/en/troubleshooting/file-ownership-and-permissions?_ga=2.157058169.316300466.1621368884-1114289586.1620742224) 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?

---

<div class="post-metadata">

**Author:** ![brightworkcreative](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/brightworkcreative/32/1930_2.png) [@brightworkcreative](https://forum.mautic.org/u/brightworkcreative)\
**Post date:** [May 18, 2021, 8:34pm UTC](https://forum.mautic.org/t/grapejs-builder-wont-save-changes-to-landing-pages-500-error-on-post-cookie-samesite-setting-warnings-in-builder/19418/7 "2021-05-18T20:34:06Z")

</div>

**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.

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [May 19, 2021, 7:47am UTC](https://forum.mautic.org/t/grapejs-builder-wont-save-changes-to-landing-pages-500-error-on-post-cookie-samesite-setting-warnings-in-builder/19418/8 "2021-05-19T07:47:21Z")

</div>

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