Fix block placement filter format not found error

Created on 24 May 2024, about 1 month ago
Updated 21 June 2024, 7 days 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

RTBC

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.69.0 2024