Description
openedon Dec 7, 2022
Quick summary
When the Table of Contents block is nested inside a column, it's throwing an unexpected error in the editor: This block contains unexpected or invalid content.
This stops the block from updating to match the page.
Steps to reproduce
- On a new page or post, add the Table of Contents block, along with a couple Heading blocks to give the TOC block something to reference.
- Publish the page and refresh.
- Next, add a columns block, and place the TOC block inside the Columns block.
- Update the page, and refresh once more.
What you expected to happen
The block to not break when nested.
What actually happened
The block displays the unexpected error
. Selecting Attempt Block Recovery fixes, but the issue returns the next time you load the editor.
Example
Screen.Capture.on.2022-12-07.at.16-19-04.mp4
Screen.Capture.on.2022-12-07.at.16-38-35.mov
Selecting ...
and Resolve Shows:
From there, selecting Convert to Blocks
changes the Table of Contents into a Static list, which no longer automatically updates, so it's feasible that users will end up breaking their TOC's automatic workings while trying to resolve this issue.
Context
Came up while helping this user create a page with a 2-column layout and Table of Contents blocks in their right-hand sidebar: 38414229-hc
Platform (Simple, Atomic, or both?)
Simple
Theme-specific issue?
Not Theme-Specific.
Tested on Simple, using multiple themes: Twenty Twenty, Penscratch 2
Browser, operating system and other notes
No response
Reproducibility
Consistent
Severity
Some (< 50%)
Available workarounds?
No but the platform is still usable
Workaround details
There's no alternative way to add the TOC block to a column and prevent that error from appearing. The user will need to select Attempt Block Recovery
every time they update their page.