I use Druapl 8.1.8; tried both 8.x-1.0-beta5 and 8.x-1.x-dev, got the same error message when edit the workflow.

I was wondering if this module is under active development; I hope it is, since the content_moderation is already part of Drupal core. Check 8.2.0-beta2!

Symfony\Component\Routing\Exception\RouteNotFoundException: Route "entity.workflow_type.canonical" does not exist. in Drupal\Core\Routing\RouteProvider->getRouteByName() (line 187 of core/lib/Drupal/Core/Routing/RouteProvider.php).
Drupal\Core\Routing\UrlGenerator->getRoute('entity.workflow_type.canonical') (Line: 277)
Drupal\Core\Routing\UrlGenerator->generateFromRoute('entity.workflow_type.canonical', Array, Array, 1) (Line: 105)
Drupal\Core\Render\MetadataBubblingUrlGenerator->generateFromRoute('entity.workflow_type.canonical', Array, Array, 1) (Line: 735)
Drupal\Core\Url->toString(1) (Line: 157)
Drupal\Core\Utility\LinkGenerator->generate(Object, Object) (Line: 94)
Drupal\Core\Render\Element\Link::preRenderLink(Array)
call_user_func(Array, Array) (Line: 381)
Drupal\Core\Render\Renderer->doRender(Array) (Line: 448)
Drupal\Core\Render\Renderer->doRender(Array) (Line: 448)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 195)
Drupal\Core\Render\Renderer->render(Array, ) (Line: 226)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 574)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 227)
Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object, Object) (Line: 117)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object) (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object) (Line: 149)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 64)
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: 98)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 77)
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: 628)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

Comments

pericxc created an issue. See original summary.

johnv’s picture

Title: Cannot edit Workfflow » Error 'Route "entity.workflow_type.canonical" does not exist.'prevents editing Workflow
Version: 8.x-1.x-dev » 8.x-1.0-beta5
Status: Active » Postponed (maintainer needs more info)
Related issues: +#2697031: WorkflowConfigTransitionListBuilder serves no purpose

Please try the latest dev version. The related issue 2697031 is committed.
Also, please give a list of installed modules. IMO it is caused by another module calling workflow.

0Sarah0Al’s picture

Hi there
I just downloaded workflow and I had the same error ,,,

It looks like drupal console adds a canonical link path to @ConfigEntityType annotation.

Just as mentioned here: https://www.drupal.org/node/2666230
in comment #10

I deleted the following:
modules/contrib/workflow/src/Entity/Workflow.php
line # 41
* "canonical" = "/admin/config/workflow/workflow",

And the error is gone..

  • johnv committed ee533fe on 8.x-1.x
    Issue #2796705: Error 'Route entity.workflow_type.canonical does not...
johnv’s picture

Title: Error 'Route "entity.workflow_type.canonical" does not exist.'prevents editing Workflow » Error 'Route "entity.workflow_type.canonical" does not exist' prevents editing Workflow
Related issues: +#2919253: Remove deprecated call to link() function

I could only reproduce this error when trying to fix #2919253: Remove deprecated call to link() function.

I did not remove the line, as proposed in #3, since that was to no avail.
Instead, I completed all lines in Workflow.phpm,workflow.routing.yml and wokflow.links.task.yml

Please try again.

johnv’s picture

Version: 8.x-1.0-beta5 » 8.x-1.0-beta6
Status: Postponed (maintainer needs more info) » Fixed

  • johnv committed c244dde on 8.x-1.x
    Issue #2796705 by johnv: Error 'Route entity.workflow_type.canonical...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

johnv’s picture

Title: Error 'Route "entity.workflow_type.canonical" does not exist' prevents editing Workflow » Route "entity.workflow_state.canonical" error prevents editing Workflow
johnv’s picture

Title: Route "entity.workflow_state.canonical" error prevents editing Workflow » Route "entity.workflow_type.canonical" error prevents editing Workflow