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

Created on 9 November 2022, over 2 years ago
Updated 22 January 2023, about 2 years 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

🇵🇱Poland 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.71.5 2024