Gutenberg Block validation failed
-
Hello,
I have a Gutenberg block that was recently modified by one of my developers, specifically changing the CSS classes. After updating from the previous version to the modified one, the block is now displaying the error: “Block contains unexpected or invalid content.”
Does the Gutenberg editor trigger a block validation error when changes are made to CSS classes or the overall DOM structure? If so, what steps can I take as a developer to prevent or resolve this issue?
Content generated bysavefunction:
<div class="wp-block-block-name-buttons block-name-block-button left tabletAlignleft mobileAlignleft block-name-block-buttons block-undefined block-name-buttons__outer-wrap block-name-buttons-stack-mobile"><div class="block-name-buttons__wrap block-name-buttons-layout-wrap"></div></div>
Content retrieved from post body:
<div class="wp-block-block-name-buttons left tabletAlignleft mobileAlignleft block-name-block-button block-name-buttons__outer-wrap block-name-buttons-stack-mobile"><div class="block-name-buttons__wrap block-name-buttons-layout-wrap"></div></div>Any suggestions to resolve this would be greatly appreciated!
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Gutenberg Block validation failed’ is closed to new replies.