WSOD when adding workflow state

Created on 16 February 2024, over 1 year ago

Problem/Motivation

When adding a workflow state (using the contrib Workflow module ) we get a WSOD (see below).

I suspect that this has to do with how the Workflow States form (`workflow_state_form`) is structured. While we generally handle forms that contain multiple configs gracefully, this one might be an exception.

The website encountered an unexpected error. Please try again later.

Error: Call to a member function get() on null in Drupal\config_enforce\Form\AbstractEnforceForm->getContext() (line 194 of modules/contrib/config_enforce/src/Form/AbstractEnforceForm.php).

Drupal\config_enforce_devel\Form\EmbeddedEnforceForm->shouldSkipThemeSettingsSubmit(Object) (Line: 37)
Drupal\config_enforce_devel\Form\EmbeddedEnforceForm->submitForm(Array, Object)
call_user_func_array(Array, Array) (Line: 114)
Drupal\Core\Form\FormSubmitter->executeSubmitHandlers(Array, Object) (Line: 52)
Drupal\Core\Form\FormSubmitter->doSubmitForm(Array, Object) (Line: 597)
Drupal\Core\Form\FormBuilder->processForm('workflow_state_form', Array, Object) (Line: 325)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 224)
Drupal\Core\Form\FormBuilder->getForm(Object) (Line: 94)
Drupal\Core\Config\Entity\DraggableListBuilder->render() (Line: 23)
Drupal\Core\Entity\Controller\EntityListController->listing('workflow_state')
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 592)
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: 181)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->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: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 704)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

Steps to reproduce

  1. Enable Config Enforce Devel
  2. Create a workflow
  3. Create a workflow state
  4. Enforce the workflow state
  5. Add a second workflow state
  6. Observe the WSOD (see above)

I don't recall if this occurs upon adding the first workflow state. But it definitely doe on subsequent ones.

Proposed resolution

TBD

Remaining tasks

TBD

User interface changes

N/A

API changes

TBD

Data model changes

N/A

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇨🇦Canada ergonlogic Montréal, Québec 🇨🇦

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

Comments & Activities

Production build 0.71.5 2024