Composer / TinyMCE not saving text.

Permalink
I'm editing a page in Composer and the fields save except the WYSIWYG / TinyMCE field. I can see there is an autosave function firing while I edit and it gives the response:

{"error":false,"time":"4:16 PM","timestamp":"01\/03\/2020 4:16 pm"}No errors in my console or in the C5 logs.


I've tried Chrome and Firefox and if I click save at the bottom it refreshes the page, says it has saved successfully, but my text is gone from the WYSIWYG / TinyMCE field.

Any idea how to fix this? Cheers!

madesimplemedia
 
JohntheFish replied on at Permalink Reply
JohntheFish
Such symptoms are typically the result of the JavaScript handler that should attach to the save button not attaching or being preempted by something else. There may be an error report in the browser dev console. Look in the console tab and also in the network tab.

Some suspects:
- An ad blocker browser extension.
- An over-enthusiastic javascript widget, such as a smooth scroll attaching to everything with no restraint
- Broken html on the page such as <div> without a corresponding </div>, either directly on the page or in the edit mode view or edit dialog for a block.
- Another block's JavaScript running when the page is in edit mode
- JavaScript in the theme that shouldn't really be allowed to run when a page is in edit mode
madesimplemedia replied on at Permalink Reply
madesimplemedia
Thanks for the ideas. No errors in console or network.
Also the save seems to happen in the background anyway without need to click the button. Whether I click the button or not, the content in the TinyMCE editor is not saved.

This is in composer in the dashboard, so I don't think the last 3 suggestions could occur?
mnakalay replied on at Permalink Reply
mnakalay
Actually the broken HTML bit is possible in composer if your content itself is guilty of that.

An easy way to check that is empty the content block and try to save again.

Can you confirm that you only have that problem on that one page and it's working normally on other pages?
madesimplemedia replied on at Permalink Reply
madesimplemedia
Thanks. It affects all pages, not just one.
The content blocks are already empty, any attempt to add content doesn't save
JohntheFish replied on at Permalink Reply
JohntheFish
I agree with your rationale w.r.t composer. Do you have the same issue on normal page edit? What other fields are in the composer form?

As an experiment, does swapping the site back to elemental still give the bug?
madesimplemedia replied on at Permalink Reply
madesimplemedia
Thanks.
So editing a content block saves without issue.
Also if I try the Elemental theme the issue is still there.
JohntheFish replied on at Permalink Reply
JohntheFish
Going back to my first thoughts, are there any custom page attributes that could be dumping unwanted script onto the composer view?

Are there any packages installed that could be interfering via c5 events - set up in package on_start() method.

Are there any other blocks on the composer form?
madesimplemedia replied on at Permalink Reply
madesimplemedia
Not solved yet, but awaiting client budget before going any further.
Just wanted to say thanks for the thoughts on this, might be back on this soon!