Problem/Motivation
Getting a 500 error when accessing /admin/modules with the following PHP message:
Fatal error: Declaration of Drupal\views_bulk_edit\Form\BulkEditFormTrait::submitConfigurationForm(array &$form, Drupal\Core\Form\FormStateInterface $form_state) must be compatible with Drupal\views_bulk_operations\Action\ViewsBulkOperationsActionBase::submitConfigurationForm(array &$form, Drupal\Core\Form\FormStateInterface $form_state): void in /app/htdocs/modules/contrib/views_bulk_edit/src/Plugin/Action/ModifyEntityValues.php on line 380
Steps to reproduce
- Install version 2.7 of views_bulk_edit with version 4.2.1 of views_bulk_operations
- Access /admin/modules
- PHP Fatal Error is displayed
Proposed resolution
In src/Form/BulkEditFormTrait.php, change
public function submitConfigurationForm(array &$form, FormStateInterface $form_state) {
to
public function submitConfigurationForm(array &$form, FormStateInterface $form_state) : void {
Issue fork views_bulk_edit-3316334
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3316334-interface-incompatible-with
changes, plain diff MR !14
Comments
Comment #3
roryfsoton commentedHave submitted the above change as an MR - I'm new to Drupal contributions so I hope this is alright! :)
Comment #4
pookmish commentedThe MR applies cleanly and corrects the issue.
Comment #5
maxstarkenburgThanks, @roryfsoton. I was a bit taken aback that updating VBO had this effect. Seconding @pookmish, the diff from your MR works well for a patch to resolve the WSOD for me. Much appreciated.
Comment #7
graber commentedYeah, it's the second time coding standards fixes in VBO break backwards compatibility here. Thanks for the MR, committed, will release together with D10 readiness a bit later today.