Fatal error in `BlockContentBlock::submitConfigurationForm` due to missing `: void` return type

Created on 10 July 2025, 4 days ago

Problem/Motivation

The submitConfigurationForm method in the BlockContentBlock class does not include the : void return type, which causes a fatal error due to a mismatch with the parent class BlockBase. This issue occurs when updating from Drupal 10 to Drupal 11 with php 8.3

Steps to reproduce

  1. Install or update a Drupal site with the block_content module enabled.
  2. Run drush updatedb or interact with blocks that use the BlockContentBlock plugin, in my case the block_post_update_set_menu_block_depth_to_null_if_zero trigger the issue .
  3. Observe the fatal error in the logs or terminal.

Proposed resolution

Add the : void return type to the submitConfigurationForm method in the BlockContentBlock class to ensure compatibility with the parent class BlockBase.

Release notes snippet

Fixed a fatal error in the BlockContentBlock plugin caused by a missing : void return type in the submitConfigurationForm method with php 8.3

πŸ› Bug report
Status

Active

Version

11.2 πŸ”₯

Component

block_content.module

Created by

πŸ‡―πŸ‡΄Jordan m.abdulqader

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

Comments & Activities

Production build 0.71.5 2024