- Issue created by @fjgarlin
- 🇩🇪Germany adam1
@fjgarlin Unfortunately, I was confirming too fast that MR14 worked. As it turn out, I could place the TOC block in block-layout without throwing an error message, but then there is no TOC block displayed. Using automatic placing or via token [toc] works as expected.
- 🇪🇸Spain fjgarlin
That might be a separate issue. The change in this MR is purely for the "Fatal error" issue.
- 🇮🇹Italy finex
I also confirm that the patch fixes the fatal error, but the toc block is missing. Moreover, the toc_api seems to have an issue on LB as well, so I don't know if the missing block is due to a bug in toc_api or toc_filter. I'm investigating.
- 🇮🇹Italy finex
It seems that toc_api (specifically the TocBlockBase class) has an issue with Layout Builder. The getCurrentToc() method returns a null value. Additionally, the getCurrentNode() function checks the route name but doesn't account for Layout Builder paths.
I've reported the issue on the toc_api module: https://www.drupal.org/project/toc_api/issues/3520464 🐛 Layout builder fatal error Active - 🇨🇦Canada joseph.olstad
Thanks for this, just noticed this now, I'll review this asap.
- 🇨🇦Canada joseph.olstad
Ah , looks good, unfortunately I'm not the maintainer of this project.
- 🇨🇦Canada smulvih2 Canada 🍁
Adding patch from PR here so I can use it in my project.
- 🇨🇦Canada joseph.olstad
Postponed on upstream toc_filter fix being merged/tagged/released.