The Block has been updated
-
Dear Support,
I’m seeing on the backend for the block, “This block has been updated. Please update to refresh” and I have an update button. When I press the update button, the content in the block disappears.
In the frontend everything looks okay.
If i delete the block in the backend and recreate it with the contents, save it and exit the post, Re-enter the poost again, I see the same problem again.
Any idea what the problem could be?
Thanks,
Edy
The page I need help with: [log in to see the link]
-
This is usually a conflict with another plugin or block that’s on the page. Or a plugin that’s editing other blocks. Could you try isolating it? Can you also check in the browser console (let me know if you don’t know how) for errors? It will say something like “validation error”
Thanks for your prompt reply.
Do you mean inspect, console? I didn’t see a “validation error”
I think, that I have found something in the backend, inspect, console
-
This reply was modified 2 months ago by
fafa24.
Hi, yes the browser console. Here’s the instructions for Chrome. Make sure you’re on the “console” tab and reload the page.
https://developer.chrome.com/docs/devtools/open
You said you found something though. What did you find?
I was trying to share the picture yesterday, Now let’s try a hyperlink
https://app.screencast.com/Muu6fahrFKCEM
Thanks Edy
The line at the top shows
<div class="wp-block-kevinbatdorf-code-block-pro"></div>which means everything inside the code block is being stripped away by something else in the editor. Do you have other blocks added to this page? What fi you create a page and only add the code block? Can you debug that to isolate when exactly it breaks?Thanks – a new post with one code block has the same behavior. I was suspecting Perfmatters is the reason. However even after disabling the block still gets damage in the backend.
I’ll probably have to create a staging side and troubleshoot one by one plugin. Any other idea?
You could try just disabling all plugins at once. if you have the ability to do that without breaking things for everyone. Then you could at least validate its a plugin conflict. Do you have a lot of plugins? I could also install them locally if you have a list you can provide. It could be a conflict with a theme function too though, or a “mu-plugin” (which sometimes are installed and don’t show up in the plugins list)
Hello – thanks for your kind help so far.
I was able to clone my website to a temp domain (staging site). I disabled all my plugins except those from Kadence (It’s my theme and Block). I created a new post with some code blocks and then I re-enabled all my plugins one-by-one again until all my plugins were re-enabled again.
Between I tested if the Code Blocks Pro were fine and they didn’t break at all. So in the end on my staging site I had re-enabled all my plugins and the Code Blocks Pro were still fine.
It looks like I can rule out a plugin conflict, but I have no idea what else it could be.
Any idea? ChatGPT mentioned it could be a language MUI? I’m using WordPress with English interface.Did the code block work at some point while testing your staging site or did it fail at every step?
I created a new post with some code blocks and then I re-enabled all my plugins one-by-one again until all my plugins were re-enabled again.
Especially during this step above. Did it ever work, then stop working?
If it never worked on the staging site, then it could be a conflict with kadence. But did the code block ever work on the live site (like last week) or did you only start using it yesterday?
Sorry maybe I was not clear – yes on the staging site the Code Block Pro always worked during testing, enabling the plugin one by one. There was no problem.
On the live side: yes it worked before fine, however I can’t say when it stopped working. I don’t use it much in my posts. The good thing is in the frontend it displays fine.
Okay so to clarify, you add code to the code block on the live server, it saves properly and works on the front end. But when you go back and edit the page, you get the warning that the block has an update, and accepting that update results in an empty block.
That indicates that something is transforming the code block in the editor during the initial rendering of the editor itself. Some plugins might be adding meta data or attempting to format other blocks (depending on the context of the plugin).
Another follow up question. If on the live site you only add one single code block to a page and nothing else (and delete any default blocks maybe your theme adds automatically), does it work then?
If still not working, and you’re confident the staging server matches the live server, could it be an mu-plugin from your hosting company perhaps? You can check here: https://share.cleanshot.com/P7mQ43v6
Otherwise we’d have to debug on the live server to see what’s different there vs your staging server. Something must be different.
-
This reply was modified 2 months ago by
You must be logged in to reply to this topic.