- Issue created by @byrond
- Merge request !153483473: Implement ContainerFactoryPluginInterface in WorkbenchBlock β (Open) created by byrond
- πΊπΈUnited States agentrickard Georgia (US)
Duplicates π Fatal errors in WorkbenchBlock Needs review
Updating to Workbench 8.x-1.5 while using the Workbench Information block on a site will cause it to crash with the following error:
TypeError: Drupal\workbench\Plugin\Block\WorkbenchBlock::__construct(): Argument #1 ($module_handler) must be of type Drupal\Core\Extension\ModuleHandlerInterface, array given, called in /var/www/html/docroot/core/lib/Drupal/Core/Plugin/Factory/ContainerFactory.php on line 25 in Drupal\workbench\Plugin\Block\WorkbenchBlock->__construct() (line 33 of /var/www/html/docroot/modules/contrib/workbench/src/Plugin/Block/WorkbenchBlock.php).
On a site without the block in use, it cannot be placed (fails silently), and that error is logged.
Install Workbench.
Go to block layout.
Place the "Workbench information" block in any region.
Nothing will happen, and an error is logged.
Workbench was recently updated to fix some code review errors, and dependency injection was used for the module handler in the block. However, ContainerFactoryPluginInterface was not implemented, so the parameters are not passed correctly to the block constructor.
Active
1.5
Code
Duplicates π Fatal errors in WorkbenchBlock Needs review