- Issue created by @lukasz.tyc
- Merge request !22Issue #3509064 by lukasz.tyc: Undefined array key "class" in... → (Open) created by lukasz.tyc
When using the toc_api module in Drupal, an undefined array key "class" error is encountered in the function template_preprocess_toc_tree(). This error occurs at line 123 of modules/contrib/toc_api/toc_api.module.
Enable the toc_api module.
Use it in conjunction with a content type or view where the table of contents (TOC) is displayed.
Navigate to a page where the TOC is rendered.
Adjust the template_preprocess_toc_tree() function in toc_api.module to check if the "class" key exists before accessing it. This ensures that the error is prevented when the key is not defined.
Active
1.7
Code