Blocks

Block Error: Unexpected or Invalid Content

Occasionally a block will display an error if it contains content that has a formatting problem. There are a few different ways to fix this if it comes up.

Table of Contents

Error Overview

When a block contains an error, it displays the following message:

This block contains unexpected or invalid content.

Screenshot: the image shows a block displaying an error. The block with the error shows the message "This block contains unexpected or invalid content".

This can happen for a number of reasons. Commonly, it will appear if you modify the HTML of the block in the Code Editor and make a syntax error. You can check the HTML to make sure you have used the correct syntax.

In the case of third-party blocks (installed via plugins on the Business and eCommerce plans only), the error can appear if you are using an old version of the block or the markup is somehow incorrect. In these cases, you can report the error to the plugin’s developer directly.


↑ Table of Contents ↑

Four Ways to Solve The Error

The block will give you several options to fix the error: Resolve, Convert to HTML, and an ellipsis (three-dot) button containing the options Convert to Classic Block and Attempt Block Recovery.

Screenshot: A block displaying the error message "This block contains unexpected or invalid content" has three buttons underneath. The image shows the third button active, and the ellipsis menu is visible, showing the options 'Convert to Classic Block' and 'Attempt Block Recovery'.

Resolve
Screenshot: indicating the Resolve button within a block displaying an error

The Resolve button attempts to automatically present a block-based solution with the ‘Convert to Blocks’ button on the right hand side, and compares it with converting directly to HTML:

Screenshot: the Resolve Block pop-up compares converting the invalid content to a Custom HTML block (left column) or attempting to fix errors and return the fixed content to the block it was added to.

Convert to HTML

The Convert to HTML block converts the invalid content directly into a HTML block. This is the same function as the ‘Convert to HTML’ option which is part of the Resolve option above.

Screenshot: a block showing the text "This block contains unexpected or invalid content" pointing to 'Convert to HTML'.

Convert to Classic Block

To convert the invalid content into a Classic block, click the ellipsis (three-dot) button, and choose ‘Convert to Classic Block’ from the menu:

Screenshot: a block showing the text "This block contains unexpected or invalid content" has three buttons below the text. The second button is "Convert to HTML".

Attempt Block Recovery

To check if the block editor can restore the block as it was before the error appeared, click the ellipsis (three-dot) button, and choose ‘Attempt Block Recovery’:

Screenshot: a block showing the text "This block contains unexpected or invalid content" has three buttons below the text. The third button is an ellipsis (three-dot) button which opens a menu with two more options. The second option in this menu is "Attempt Block Recovery".

This option can allow you to review the block as it was so that you can potentially remove the cause of the error.

Not quite what you're looking for?

Get Help