This is a follow up for #2645516: Add weight to transitions.

Sites already using Workbench moderation will see the following warning every time moderation transitions are loaded, such as at /node/add/article:

Notice: Undefined index: weight in Drupal\Core\Config\Entity\Query\Query->Drupal\Core\Config\Entity\Query\{closure}() (line 97 of core/lib/Drupal/Core/Config/Entity/Query/Query.php).
Drupal\Core\Config\Entity\Query\Query->Drupal\Core\Config\Entity\Query\{closure}(Array, Array)
uasort(Array, Object)
Drupal\Core\Config\Entity\Query\Query->execute()
Drupal\workbench_moderation\StateTransitionValidation->getTransitionsFrom('draft')
Drupal\workbench_moderation\StateTransitionValidation->getValidTransitions(Object, Object)
Drupal\workbench_moderation\Plugin\Field\FieldWidget\ModerationStateWidget->formElement(Object, 0, Array, Array, Object)
Drupal\Core\Field\WidgetBase->formSingleElement(Object, 0, Array, Array, Object)
Drupal\Core\Field\WidgetBase->formMultipleElements(Object, Array, Object)
Drupal\Core\Field\WidgetBase->form(Object, Array, Object)
Drupal\Core\Entity\Entity\EntityFormDisplay->buildForm(Object, Array, Object)
Drupal\Core\Entity\ContentEntityForm->form(Array, Object)
Drupal\node\NodeForm->form(Array, Object)
Drupal\Core\Entity\EntityForm->buildForm(Array, Object)
call_user_func_array(Array, Array)
Drupal\Core\Form\FormBuilder->retrieveForm('node_article_form', Object)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object)
Drupal\Core\Entity\EntityFormBuilder->getForm(Object)
Drupal\node\Controller\NodeController->add(Object)
call_user_func_array(Array, Array)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
call_user_func_array(Object, Array)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1)
Stack\StackedHttpKernel->handle(Object, 1, 1)
Drupal\Core\DrupalKernel->handle(Object)
CommentFileSizeAuthor
#3 add_weight_to_existing-2657082-3.patch1.29 KBjuampynr

Comments

juampynr created an issue. See original summary.

juampynr’s picture

juampynr’s picture

Status: Active » Needs review
StatusFileSize
new1.29 KB

Here is a patch that add weight to existing transitions.

Crell’s picture

Status: Needs review » Closed (won't fix)

WBM is still alpha and explicitly NOT API stable. It says so in the release notes. :-) Upgrades are not yet supported, so I don't see a reason to try supporting them here.

(If you were using the label names from pre-alpha2, the UI would now make no sense at all, either.)