We are using SO on several sites without issue.
As of today we started having an issue on one page.
Page is made up of an SO Row with two SO Editor widgets.
In the first we have a simple text
In the second we have a short code.
When we try and update either of these widgets (add content, add settings to the side panels) and save the changes do not take effect.
In the first widget (with text) when we open it after a save we get “There is a newer version of this widget’s content available” with a Dismiss and Restore button.
Restore and save just repeats the cycle
Dismiss reverts and we don’t get the message again.
(We only get this on the first widget, the second widget just reverts to the origina {short code} content that was there before we edited it)
No errors are reported in the error log or the console.
WP_DEBUG does not show anything
We can get around it by creating a new SO Editor Widget with the new content / changes and save that, then delete the old widget – this works – but not really a feasible long term solution.
We tried the Text widget to see if it was a broader problem – this saves fine.
Usually I go to the logs to see what is failing – but they are pristine. Even wrote a test script with deliberate error to make sure logging is working – which it is.
Not sure where to go next with debugging this.
Interested to know if anyone has any ideas where to look?
Hi Julian
Thanks for reaching out. Are there any errors in the console during the editing and saving process?
https://wordpress.org/support/article/using-your-browser-to-diagnose-javascript-errors/#step-3-diagnosis
Hi Andrew,
I have done some more tests – including creating a new page. The problem does not happen there.
What I did notice is on the page that is not working when you try to edit the Widget (not on page load, only when clicking the edit link for the SO Editor) – there is an error in the console
“”can’t access property “translate”, window.tinymce is undefined”
I did not notice this before as I was looking for errors on save and page load.
This error is not present on the new page which also has the SO Editor Widget.
i also downloaded the layout and uploaded it to the new page – replacing the one that was there – the problem followed the layout.
I then removed the panel with the SO Editor containing the short code – that seemed to fix the problem.
I downloaded the layout and compared that with the layout that was the problem.
It seems that the problem layout somehow had
I tried importing this to the problem page – same problem.
I eventually deleted the page, recreated it and imported the layout. This seems to have fixed the problem.
For some reason on that page the tinymce editor was missing or causing problems – no idea why at this stage. Recreating the page seems to have solved it.
Would be interested to know what the root cause was.
Hi Julian
Thanks for the detailed analysis and feedback and for working your way through the problem. I’m really glad to hear you’ve made progress. I’ll ask our developer Alex to give your report a read and offer an opinion on what might have happened.
Thanks again :)
Hi Julian,
You mentioned you were able to replicate this issue with a copy of the layout. Would it be possible for you to provide us with a copy of that layout so we can run some tests against the layout? You’ll need to upload the file to a file hosting site like Pastebin, or Google Drive. If possible, please outline the changes you were attempting to make to the SIteOrigin Editor widget that wasn’t saving as that’ll allow us to try to replicate this saving issue against the provided layout by following the same steps.
Kind regards,
Alex
Sure – here you go
Here is the problematic one
{"widgets":[{"title":"","text":"This carefully-selected group of innovative global and South African Legal specialists will zone in on the technology and ideas that are transforming the way law firms and in-house legal teams operate. \n","text_selected_editor":"tinymce","_sow_form_id":"978515029611bc985b9140706431771","_sow_form_timestamp":"1629211029987","autop":false,"panels_info":{"class":"SiteOrigin_Widget_Editor_Widget","raw":false,"grid":0,"cell":0,"id":0,"widget_id":"36969c75-be97-4869-8e16-213892e2f990","style":{"widget_css":"text-align: center;","background_image_attachment":false,"background_display":"tile","iw-visible-screen":"iw-all","iw-visible-layout":"iw-all"}}},{"filter":"1","text":"[teg_speakers_grid type=\"full\"]","title":"","type":"visual","panels_info":{"class":"SiteOrigin_Widget_Editor_Widget","raw":false,"grid":0,"cell":0,"id":1,"widget_id":"78b7b310-8e90-4c26-ab99-b5288cf726ff","style":[]}}],"grids":[{"cells":1,"style":[]}],"grid_cells":[{"grid":0,"index":0,"weight":1,"style":[]}],"name":"INTRODUCING OUR 2021 SPEAKERS"}
Hi Julian,
Thanks. I was able to make changes to the provided layout without issue. If possible, can you please elaborate on the specific change you were making that wasn’t saving?
Kind regards,
Alex
The client wanted the text on the page centered and was complaining they could not get it to work.
I edited the page, opened the widget in question and attempted to add some CSS styles in the Attributes side panel.
Published the page – checked – changes not reflecting.
Went back into the widget, opened Attributes – styles were not there.
Repeated – same result.
Widget was in Text mode with text between tags so I attempted to add the styles inline on the element. Saved – same result – no changes reflected.
Went back into the widget – This time the Restore / Dismiss message was showing.
Restored – my changes were restored. Saved – same result.
Repeated several times while checking console and error log – same result.
Checked CPanel settings to make sure error logging was turned on – it was.
Wrote a test PHP script with a deliberate error – tested that – reported to the error log.
Tried updating PHP version – same result
Tried updating SO Widget Plugin versions – same result.
Checked the database wp_posts for the page_id – found a bunch of them – the data was saving to the DB but not reflecting in the page.
Checked to see if this was a general SO problem or just that Widget – added a Text widget – tried saving changes – all worked – confirmed on repeated attempts.
Created a new SO Editor widget – identical to the problem one – saved – that worked but when tried to edit – same problem
Decided to post in this forum to see if i could get some diagnostic ideas.
Yesterday tried a different tack to isolate the problem. That is when I created a new page and tested there and discovered the tinymce error.
I was not able to repeat the problem by importing the layout into a new page. I seem to remember that the first time I imported the layout I got a Restore / Dismiss and data would not save but when I changed the text_selected_editor to html that resolved.
It seems to be something specific to the original page somehow not having access to the tinymce code. Unfortunately I did not do a view source of the problem page before deleting it – that might have been useful to see what was different between the working page and the broken one.
Hi Julian,
Thanks for clarifying. Widget Styles are separate from the widget itself so it’s odd that this issue was only affecting the SIteOrigin Editor widget for you. If the changes were visible in the database, but not when viewing the page that may point towards some sort of caching occurring. Do you have a server-side cache setup, or anything like that?
If Page Builder is showing, TinyMCE is loading so it’s not clear why that specific SiteOrigin Editor widget wasn’t able to use it. Hm. Unfortunately, at this point, I’m not too sure what caused this issue. If it happens again, I’ll need to inspect the page itself to work out what is going on.
Kind regards,
Alex
I did not clarify if the changes were showing in the DB only that the records were being created – I did not look at the post_content to see what was there.
I can dump those records and send them to you – if that would help and you have a way for me to upload them.
Regarding TinyMCE – here is a timeline of how that works
1. F12 to console
2. Load page – page builder loads and displays correctly – no issues in the console
3. Click Edit link on widget
4. Console shows error (on problem page – not recreated page)
Otherwise understand it is difficult to trace – I spent as much time as I could within the limits of my client’s budget.
If I come across it again I will do some more debugging, capture the source and report back here.
Hi Julian,
Ah. My mistake. Thank you for the timeline. Let me know if this happens again and we’ll pick this back up.
Kind regards,
Alex