Cannot add Table of content block in the sidebar

Created on 24 May 2025, 14 days ago

Problem/Motivation

Table of Content block fails to be added to the sidebar for Olivero theme.

Error message
Oops, something went wrong. Check your browser's developer console for more details

Console error

An AJAX HTTP error occurred.
HTTP Result Code: 200
Debugging information follows.
Path: /admin/structure/block/add/toc_filter/olivero?region=sidebar
StatusText: parsererror
ResponseText: 
Fatal error:  Declaration of Drupal\toc_filter\Plugin\Block\TocFilterBlock::blockAccess(Drupal\Core\Session\AccountInterface $account) must be compatible with Drupal\toc_api\Plugin\Block\TocBlockBase::blockAccess(Drupal\Core\Session\AccountInterface $account): Drupal\Core\Access\AccessResultInterface in /var/www/html/web/modules/contrib/toc_filter/src/Plugin/Block/TocFilterBlock.php on line 24

Steps to reproduce

Add the Table of contents to the Olivero theme
Structure > Block layout > Sidebar > Place block > Table of contents

πŸ› Bug report
Status

Active

Version

2.3

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States toamit

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

Comments & Activities

Production build 0.71.5 2024