After updating to Drupal 11.2.0, a fatal error occurs on the Varbase Workflow settings page:
/admin/config/varbase/varbase-workflow
This is caused by a backward-incompatible change in the constructor of Drupal\Core\Form\ConfigFormBase, which now requires a RequestStack service as the second parameter. The current implementation in VarbaseWorkflowSettingsForm only injects the ConfigFactoryInterface.
Error:
ArgumentCountError: Too few arguments to function Drupal\Core\Form\ConfigFormBase::__construct(), 1 passed in ... and exactly 2 expected in ConfigFormBase.php on line 44.
Steps to reproduce
Given I am logged in with the
“webmaster”user
When I navigate to"/admin/config/varbase/varbase-workflow"
Then I hit a fatal errorThe website encountered an unexpected error. Try again later. ArgumentCountError: Too few arguments to function Drupal\Core\Form\ConfigFormBase::__construct(), 1 passed in /app/docroot/modules/contrib/varbase_workflow/src/Form/VarbaseWorkflowSettingsForm.php on line 64 and exactly 2 expected in Drupal\Core\Form\ConfigFormBase->__construct() (line 44 of core/lib/Drupal/Core/Form/ConfigFormBase.php). Drupal\varbase_workflow\Form\VarbaseWorkflowSettingsForm->__construct(Object, Object, Object, Object, Object) (Line: 75) Drupal\varbase_workflow\Form\VarbaseWorkflowSettingsForm::create(Object) (Line: 36) Drupal\Core\DependencyInjection\ClassResolver->getInstanceFromDefinition('\Drupal\varbase_workflow\Form\VarbaseWorkflowSettingsForm') (Line: 48) Drupal\Core\Controller\HtmlFormController->getFormObject(Object, '\Drupal\varbase_workflow\Form\VarbaseWorkflowSettingsForm') (Line: 58) Drupal\Core\Controller\FormController->getContentResult(Object, Object) call_user_func_array(Array, Array) (Line: 123) Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 622) Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 121) Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97) Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 183) Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 76) Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 54) Drupal\simple_oauth\HttpMiddleware\BasicAuthSwap->handle(Object, 1, 1) (Line: 53) Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48) Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 28) Drupal\Core\StackMiddleware\ContentLength->handle(Object, 1, 1) (Line: 32) Drupal\big_pipe\StackMiddleware\ContentLength->handle(Object, 1, 1) (Line: 116) Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 90) Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 53) Asm89\Stack\Cors->handle(Object, 1, 1) (Line: 48) Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51) Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 53) Drupal\Core\StackMiddleware\AjaxPageState->handle(Object, 1, 1) (Line: 51) Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 715) Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
Proposed resolution
- Update the constructor of
VarbaseWorkflowSettingsFormto inject all needed dependencies and call the parent constructor properly. - Drupal Standard and Practice
Remaining tasks
- ✅ File an issue about this project
- ✅ Addition/Change/Update/Fix to this project
- ✅ Testing to ensure no regression
- ➖ Automated unit/functional testing coverage
- ➖ Developer Documentation support on feature change/addition
- ➖ User Guide Documentation support on feature change/addition
- ➖ UX/UI designer responsibilities
- ➖ Accessibility and Readability
- ✅ Code review from 1 Varbase core team member
- ✅ Full testing and approval
- ✅ Credit contributors
- ✅ Review with the product owner
- ✅ Update Release Notes and Update Helper on new feature change/addition
- ❌ Release varbase-10.1.0-alpha3, varbase_workflow-3.1.0-beta1
Varbase update type
- ✅ No Update
- ➖ Optional Update
- ➖ Forced Update
- ➖ Forced Update if Unchanged
User interface changes
- N/A
API changes
- N/A
Data model changes
- N/A
Release notes snippet
- Issue #3540283: Fixed fatal error on Varbase Workflow settings form after Drupal 11.2.0
Comments
Comment #2
rajab natshahComment #4
rajab natshahComment #5
rajab natshahComment #6
rajab natshahComment #7
rajab natshah✅ Released varbase_workflow-3.1.0-beta1
Comment #8
rajab natshahComment #9
rajab natshah✅ Released varbase-10.1.0-alpha3