Problem/Motivation
After upgrading from Drupal 8.3.7 to 8.4.0 workflows stopped working for us. Accessing "admin/config/workflow/workflows" results in the following message "Undefined index: label" (more infos below) and the list of workflows shows empty strings where state names are supposed to be visible. To see if this may be already fixed we updated to 8.5.x-dev, but got the same result. Exporting the config and importing it after dropping the database did not fix the problem either. The detailed message for 8.5.x-dev is:
Notice: Undefined index: label in Drupal\workflows\Plugin\WorkflowTypeBase->getState() (line 160 of core/modules/workflows/src/Plugin/WorkflowTypeBase.php).
Drupal\workflows\Plugin\WorkflowTypeBase->getState('author_editing') (Line: 98)
Drupal\content_moderation\Plugin\WorkflowType\ContentModeration->getState('author_editing')
array_map(Array, Array) (Line: 146)
Drupal\workflows\Plugin\WorkflowTypeBase->getStates() (Line: 79)
Drupal\workflows\WorkflowListBuilder->buildRow(Object) (Line: 233)
Drupal\Core\Entity\EntityListBuilder->render() (Line: 93)
Drupal\workflows\WorkflowListBuilder->render() (Line: 22)
Drupal\Core\Entity\Controller\EntityListController->listing('workflow')
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 576)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
call_user_func_array(Object, Array) (Line: 153)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 99)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 78)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 50)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 657)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
This is repeated for each workflow state.
One other thing we discovered is that the configuration synchronisation module reports changes to the workflow configuration even after reimporting the configuration. It looks like all workflow states are missing from config.
Comments
Comment #2
timmillwoodThere is no official upgrade path from Workflows in 8.3.7 and 8.4.0, but there is an unofficial option #2896630: Unofficial content_moderation 8.3.7 to 8.4.0 upgrade path
Comment #3
avogler commentedThank you for the clarification.
Comment #4
danjdewhurst commentedHow can there not be an official upgrade path for a core module?
"works as designed" - This core module is designed to not be upgradable?