Tried to delete workflow and got the following error:
The website encountered an unexpected error. Please try again later.Symfony\Component\Routing\Exception\MissingMandatoryParametersException: Some mandatory parameters are missing ("workflow_type") to generate a URL for route "entity.workflow_state.collection". in Drupal\Core\Routing\UrlGenerator->doGenerate() (line 182 of core/lib/Drupal/Core/Routing/UrlGenerator.php).
Drupal\Core\Routing\UrlGenerator->getInternalPathFromRoute('entity.workflow_state.collection', Object, Array, Array) (Line: 293)
Drupal\Core\Routing\UrlGenerator->generateFromRoute('entity.workflow_state.collection', Array, Array, 1) (Line: 105)
Drupal\Core\Render\MetadataBubblingUrlGenerator->generateFromRoute('entity.workflow_state.collection', Array, Array, 1) (Line: 753)
Drupal\Core\Url->toString(1) (Line: 342)
Drupal\Core\Entity\Entity->Drupal\Core\Entity\{closure}('collection')
array_filter(Array, Object) (Line: 348)
Drupal\Core\Entity\Entity->uriRelationships() (Line: 93)
menu_link_content_entity_predelete(Object, 'workflow_state')
call_user_func_array('menu_link_content_entity_predelete', Array) (Line: 402)
Drupal\Core\Extension\ModuleHandler->invokeAll('entity_predelete', Array) (Line: 378)
Drupal\Core\Config\Entity\ConfigEntityStorage->invokeHook('predelete', Object) (Line: 359)
Drupal\Core\Entity\EntityStorageBase->delete(Array) (Line: 395)
Drupal\Core\Entity\Entity->delete() (Line: 154)
Drupal\workflow\Entity\Workflow->delete() (Line: 122)
Drupal\Core\Entity\EntityDeleteForm->submitForm(Array, Object)
call_user_func_array(Array, Array) (Line: 111)
Drupal\Core\Form\FormSubmitter->executeSubmitHandlers(Array, Object) (Line: 51)
Drupal\Core\Form\FormSubmitter->doSubmitForm(Array, Object) (Line: 585)
Drupal\Core\Form\FormBuilder->processForm('workflow_type_delete_form', Array, Object) (Line: 314)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 74)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 582)
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: 151)
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: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 664)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | workflow-fix-url-route-params-2966038-7-D8.patch | 3.03 KB | balazswmann |
Comments
Comment #2
xcusso commentedSubscribing
Comment #3
johnvAre you using the latest dev version, or 1.0? Please reopen the related issue of the problem still exists in the dev version.
Comment #4
sassafrass commentedYes, I am using the dev version.
Comment #5
sassafrass commentedComment #6
balazswmann commentedI think this is also related to configuration import. Config import throws the following error:
Symfony\Component\Routing\Exception\MissingMandatoryParametersException: Some mandatory parameters are missing ("workflow_type") to generate a URL for route "entity.workflow_state.collection". in Drupal\Core\Routing\UrlGenerator->doGenerate() (line 182 of /var/www/drupalvm/web/core/lib/Drupal/Core/Routing/UrlGenerator.php).Comment #7
balazswmann commentedAttaching a patch addressing the issue described here.
Comment #8
sassafrass commentedThank-you for the patch. I applied the patch, which applied cleanly against the latest dev version. Unfortunately, I still get the same error when I try to delete a workflow.
Comment #9
anas_maw commentedI can confirm patch in #7 fix the issue for me, workflow version 1.1
Comment #10
johnvComment #12
johnvThanks, committed.
Comment #14
calbasiPatch #7 is not valid against Workflow 1.5 (probably because the code was commited, wasn't it?). But, like #8, the problem removing Workflow persists.
Even reinstalling from scratch the version 1.5, in my case, because there was some config files deleted what are not by default created in a new installation, and it seems there there is the reason of the error:
Comment #15
calbasiI solved it just clearing the cache, as suggested here:
https://www.drupal.org/project/workflow/issues/2710515#comment-11112259
So, I did:
And, then, I was able to import the config with the usual
Comment #16
calbasiComment #17
johnv