Fix block placement filter format not found error

Created on 24 May 2024, 11 months ago
Updated 12 September 2024, 7 months ago

Problem/Motivation

Getting the following after enabling and placing the Table of Contents block.

Error: Class "Drupal\toc_filter\Plugin\Block\FilterFormat" not found in Drupal\toc_filter\Plugin\Block\TocFilterBlock->blockAccess() (line 34 of modules/contrib/toc_filter/src/Plugin/Block/TocFilterBlock.php).

Steps to reproduce

  1. Enable "Display a table of contents" for a some Text Format.
  2. Scroll down the Text Format settings to Filter settings, in "Display table of contents tab", enable "Display table of contents in a block".
  3. Place the Table of contents block in Block layout.
  4. Visit a Node with the text format configured with the table of contents.

Proposed resolution

A simple fix: the FilterFormat class needs to be imported.

🐛 Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

🇺🇸United States jcandan

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024