‘This block contains unexpected or invalid content’ error when editing HTML
-
Hello,
I’m facing a problem while editing the HTML of certain blocks, such as ‘Advanced Columns’ or ‘Container’ blocks. This issue is significantly impacting my workflow as I rely on automation to generate content, and this particular functionality is crucial for me.
To illustrate, after inserting an ‘Advanced Columns’ block and opting to ‘Edit as HTML’, I can seamlessly switch back to ‘Edit Visually’ with WordPress displaying the visual blocks correctly.
The problem arises when I add a simple paragraph to the block and then try to switch back to visual editing. At this point, Gutenberg crashes and displays the error message: “This block contains unexpected or invalid content.”
Attempts to fix this via ‘Attempt Block Recovery’ have been fruitless, as it only reverts the block to its previous state, without preserving my changes. Similarly, the ‘Resolve’ option in the three-dot menu fails to solve the issue.
In summary, preserving changes when switching from HTML editing back to visual mode is currently unachievable.
- The topic ‘‘This block contains unexpected or invalid content’ error when editing HTML’ is closed to new replies.