The message This block contains unexpected or invalid content means the HTML saved for a block no longer matches what the block expects. With Ultimate Blocks, it usually appears after a plugin update or after someone edits the block HTML by hand. In most cases you can fix it in one click with Attempt recovery, and your content is not lost.
In current WordPress versions the notice reads Block contains unexpected or invalid content. and the button is called Attempt recovery. Older versions call it Attempt Block Recovery.
What you need #
- Access to the post in the WordPress block editor.
- Optional but recommended: a recent backup of your site.
Why it happens #
Each block saves its HTML inside your post. When the editor opens the post, it rebuilds that HTML from the block settings and compares the two. If they differ, WordPress shows the warning so it does not overwrite anything without asking. Common causes:
- A plugin update changed the HTML a block produces, and an older copy of the block could not be converted automatically.
- Manual HTML edits in the Code editor or with Edit as HTML changed the block markup.
- A rollback to an older Ultimate Blocks version, when the post was saved with a newer version.
- Copied or imported content from another site that runs a different Ultimate Blocks version.
- Another plugin or a security filter that changes post content when it is saved (for example by removing attributes or inline styles).
How to fix it #
- Make a copy first. If the post is important, open the three-dot menu at the top right of the editor, choose Code editor and copy everything into a text file. Switch back to the Visual editor.
- Click Attempt recovery on the broken block. WordPress rebuilds the block from its saved settings. Check that the text, links and design look right.
- Save the post with Update or Save. The warning should not come back.
If Attempt recovery does not give the right result, press Ctrl + Z (Cmd + Z on Mac) to undo it and try the options below.
Other safe fixes #
Check for a plugin update #
Go to Dashboard > Updates and update Ultimate Blocks and Ultimate Blocks Pro. New releases often include conversions for older block markup, so the warning can disappear after an update and a reload of the editor.
Compare the changes with Resolve #
Click the three-dot menu on the block warning and choose Resolve. A Resolve Block window shows the current HTML next to the rebuilt version, so you can see exactly what changed before you pick one.
Restore a revision #
If the problem started after a recent edit, open the post settings sidebar, click Revisions and restore a version from before the problem. Revisions are only available if your site keeps them.
Roll back the plugin #
If many blocks broke right after an Ultimate Blocks update, roll back to the previous version from Ultimate Blocks in your admin menu. Then contact us so we can fix it in the next release.
Avoid Convert to HTML unless you have no other option. It turns the block into a Custom HTML block, so you lose the Ultimate Blocks settings and must edit the code by hand.
When to contact support #
Contact us through Ultimate Blocks > Contact Us if the warning appears on many posts, comes back after you save, or appears right after an update. Include:
- the name of the block and a screenshot of the warning,
- your Ultimate Blocks, Ultimate Blocks Pro and WordPress versions,
- the block HTML from the Code editor, if you can.
Frequently asked questions #
Will I lose my content if I click Attempt recovery?
Usually not. Attempt recovery rebuilds the block from its saved settings. If something looks wrong, undo it with Ctrl + Z or Cmd + Z before you save.
Does the live site look broken while the warning shows?
Usually not. Visitors see the HTML that was saved. The warning only appears in the editor.
Why did this start after updating Ultimate Blocks?
The update changed the HTML a block produces. Click Attempt recovery and save, or check for a newer update that converts the old markup.
Should I edit Ultimate Blocks blocks in the Code editor?
Avoid it. Change blocks through their settings in the block sidebar. Manual HTML edits are the most common cause of this warning.
Is it safe to click Convert to HTML?
It keeps your content but turns the block into a Custom HTML block, so you lose its Ultimate Blocks settings. Try Attempt recovery first.