Layout builder fatal error

Created on 22 April 2025, 3 days ago

It seems that the new toc_api 2.x version has an issue with Layout Builder, as the getCurrentToc() method returns a null value.

TypeError: Drupal\toc_api\Plugin\Block\TocBlockBase::getCurrentToc(): Return value must be of type Drupal\toc_api\TocInterface, null returned in Drupal\toc_api\Plugin\Block\TocBlockBase->getCurrentToc()

I also noticed that the getCurrentNode() function checks the route name, but it doesn't account for Layout Builder paths.

I've marked this as a major priority because it breaks the Layout Builder experience.

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇮🇹Italy finex

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

Comments & Activities

Production build 0.71.5 2024