Some return type is not compatible with Block module

Created on 21 October 2024, 25 days ago

I couldn't place the block and the following error message appeared in the console:

An AJAX HTTP error occurred.
HTTP Result Code: 200
Debugging information follows.
Path: /en/admin/structure/block/add/custom_book_navigation/mnm_theme?region=sidebar_first
StatusText: OK
ResponseText: 
Fatal error:  Declaration of Drupal\custom_book_block\Plugin\Block\CustomBookNavigationBlock::defaultConfiguration() must be compatible with Drupal\book\Plugin\Block\BookNavigationBlock::defaultConfiguration(): array in /Users/davidschuch/Sites/mnm2/repo/www/modules/contrib/custom_book_block/src/Plugin/Block/CustomBookNavigationBlock.php on line 26"

The problem is that several return types were added in the latest version of Book module in the BookNavigationBlock class. This is the class that is extended by Custom Book Block module.

🐛 Bug report
Status

Active

Version

1.1

Component

Code

Created by

🇭🇺Hungary suchdavid

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

Comments & Activities

Production build 0.71.5 2024