Skip to content

[Block] Table of Contents: Block Error when nested inside columns on Simple sites #70913

Open

Description

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.

Markup on 2022-12-07 at 16:32:42

This stops the block from updating to match the page.

Steps to reproduce

  1. 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.
  2. Publish the page and refresh.
  3. Next, add a columns block, and place the TOC block inside the Columns block.
  4. 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

⚠️ Impact - If the user does not select Attempt Block Recovery, the TOC block will not update to reflect new changes on the page.

Screen.Capture.on.2022-12-07.at.16-38-35.mov

Selecting ... and Resolve Shows:

Screen Shot 2022-12-07 at 4 18 35 PM

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Customer ReportIssues or PRs that were reported via Happiness. Previously known as "Happiness Request".Simple/Atomic ParityFor issues related to feature parity between Simple and Atomic sites.TriagedTo be used when issues have been triaged.User ReportThis issue was created following a WordPress customer report[Platform] Simple[Pri] Normal[Type] Bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions