Site logo

Archived topic

Block Contains Unexpected or Invalid Content

13 replies · Started by Elaine on June 23, 2021

Viewing posts 1–14 of 14

I loaded the Service Starter Template. Was doing fine yesterday, adding content & images to blocks. I think I added the Classic Editor Plugin yesterday, as I always do in WordPress. Today, I see the error messages "Error: This block contains unexpected or invalid content. Resolve Convert to HTML" all through the blocks on the home page.
I am new to Generate Blocks & Gutenberg. Not sure why it's acting up today, but I cannot move forward until I understand what's going on. I removed the Classic Editor Plugin but it does not help.

Hi Elaine,

That error appears when a post or page's content is created from Classic editor and then you try to edit the page using Block editor.

Some parts of the Classic editor don't translate well when you try to edit them in Block Editor. Some information are lost or insufficient so WordPress prompts the user to try to resolve it by converting to HTML.

Also, if you've initially created the content with Block editor, and then edit it with Classic editor and then you go back to Block editor, some things will break.

If I may suggest, consider dropping Classic editor completely. It's obsolete and WordPress itself announced its intent to stop supporting it. Its end of life is set on December 2021.

Okay, thanks, I did not know WP was dropping support for Classic Editor. If I want to get the original Blocks back that were imported with the Service Starter Template, do I re-import the content?

If I want to get the original Blocks back that were imported with the Service Starter Template, do I re-import the content?

You can but it may be better to just replicate how it looks using GenerateBlocks layout because re-importing from site library means you're re-importing all of the contents meaning some parts you've edited may be overwritten by the default template you're importing.

OK, thanks. I will do that.
Also, on a related topic with the Service Starter Template, how do I access the large Hero image
on the Home page to switch it out? It's not part of the header and it's not part of the Home 'Page'.
Not sure where it is.

Also, on a related topic with the Service Starter Template, how do I access the large Hero image
on the Home page to switch it out? It’s not part of the header and it’s not part of the Home ‘Page’.
Not sure where it is.

Go to Appearance > Elements. You should find a Block element named "Global Page Headers".

Edit this block. Within the block element you'll find a container element with a background image set on it. You can change it from there.

Thanks so much for your help Elvin!

No problem. Glad to be of any help. :D

Hi Elvin
I looked into "Go to Appearance > Elements. You should find a Block element named “Global Page Headers”.

No, that is a header that appears on every page, but not the Home Page.
The Home Page has a large image, in an odd shaped container, but it is situated right below the navigation, so I don't think it's a Header.
Just asking where I can swap out this large image on the Home Page in the Service Theme.

Is this the part you're pertaining to? - https://share.getcloudapp.com/E0uAoPbx

If so, that's added within the contents of the Home page. You can change it from there. :D

It's the first container block, the image is added as a background. :D

Yes, that is the section I am referring to.
However, I can't seem to find the right container on the home page, or the background image for it.
Is this because that page is messed up from the Classic Editor?
The dropdown helper shows multiple 'Containers'.
The first 2 Containers don't seem to have a background image.

Is this because that page is messed up from the Classic Editor?

That's most likely the case. Because the section I've mentioned is created using Block editor so the things to change can be edited through its UI. GB isn't meant to be used w/ Classic editor. Doing so will cause all sorts of issues.

OK, thank you!

No problem. :D

This archived topic is closed to new replies.