• We recently installed NHS Blocks along with the Nightingale theme and companion; since then the versions have remained the same (on WP v5.6.2).

    The blocks were working as expected, and still do when we add new instances.

    But several blocks that we added initially now show validation errors on the back end: ‘This block contains unexpected or invalid content. Attempt Block Recovery’.

    Clicking block recovery on each block does restore them.

    Example console errors:

    Block validation failed for nhsblocks/card1: Expected attributes (2) [Array(3), Array(3)], instead saw [Array(3)].

    Block validation failed for nhsblocks/card1: Expected attribute ‘role’ of value ‘text’, saw ‘heading’.

    Block validation failed for nhsblocks/actionlink: Expected tag name ‘svg’ instead saw ‘span’.

    On the front end, content mainly displays as expected, apart from SVG icons (Action Link arrow, Do and Don’t tick/cross) being lost, and HTML nested inside a Panel Region being lost.

    We’d like to try to understand what caused this, to prevent it happening again. Or avoid those blocks if they are unstable. Could it be a conflict with another blocks plugin added after this content was created? As some blocks have SVG-related errors, could there be an issue with SVG security in WP?

    Thanks in advance for any advice you might have.

    • This topic was modified 3 years, 12 months ago by awacuk. Reason: Typo correction

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Thread Starter awacuk

    (@awacuk)

    Update: I’m told the NHS Blocks errors were happening before other plugins were installed, so that’s not the issue.

Viewing 1 replies (of 1 total)
  • The topic ‘Block validation error: ‘unexpected or invalid content’’ is closed to new replies.