0

I've created a simple view using the REST export to export all published content in JSON format, but I get this error:

Symfony\Component\Routing\Exception\RouteNotFoundException:
    Route "entity.moderation_state.canonical" does not exist.
    in Drupal\Core\Routing\RouteProvider->getRouteByName()
    (line 191 of core/lib/Drupal/Core/Routing/RouteProvider.php).

Drupal\Core\Routing\UrlGenerator->getRoute('entity.moderation_state.canonical') (Line: 285)
Drupal\Core\Routing\UrlGenerator->generateFromRoute('entity.moderation_state.canonical', Array, Array, 1) (Line: 110)
Drupal\Core\Render\MetadataBubblingUrlGenerator->generateFromRoute('entity.moderation_state.canonical', Array, Array, ) (Line: 754)
Drupal\Core\Url->toString() (Line: 291)

Moderation states have indeed been added, but I have no idea why that's throwing this kind of error...

1 Answer 1

0

The route is not in core. Probably it is in a contrib or custom module. You have to search for a *.routing.yml file, where it is defined and then look for an error in the yml file and then clear the cache.

You can get a complete list of all routes with drupal console:

drupal route:debug

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.