Fatal error during a configuration of a TOC block in a Layout Builder

Created on 9 November 2022, over 1 year ago
Updated 22 January 2023, over 1 year ago

Problem/Motivation

The module throws a fatal error during an attempt to add a TOC block to a Layout Builder section.

Steps to reproduce

  1. Install the TOC API module, TOC Filter and Layout Builder modules.
  2. Go to a Text Filter and activate a checkbox to show a TOC in a block
  3. Activate a Layout Builder mode for a content type display.
  4. Try to add a TOC block to a Layout Builder section.
  5. See the fatal error.

Proposed resolution

Add a check if the $toc object is empty during a block rendering.

πŸ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡¬πŸ‡ͺGeorgia Chalk

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024