Support » Plugin: Gutenberg » Upgrading a block gives ‘invalid content’ error

  • When updating a block (for example, adding a field), all previous blocks show up as broken in the editor.

    This gives the common error ‘This block contains unexpected or invalid content.’ with the options ‘Resolve’ and ‘Convert to HTML’. However, these both do not work.

    How is it possible to build blocks which are upgradable in the future? The current way makes fast development on a new website for us very hard, because all the pages which have the block need to have it manually re-added. I suspect we’re doing something wrong here, but I have no idea what.

Viewing 1 replies (of 1 total)
  • Hi,
    I think the section about “Deprecated Blocks” in the handbook answers your question.

    If you update your block you can add a deprecated-property, which allows Gutenberg to recognize older formats and transform them to the new format.

Viewing 1 replies (of 1 total)
  • The topic ‘Upgrading a block gives ‘invalid content’ error’ is closed to new replies.