Route 'entity.taxonomy_term.revision' does not exist.

Created on 8 November 2023, 8 months ago
Updated 9 November 2023, 8 months ago

Problem/Motivation

I installed and enabled this module after patching in Taxonomy workflows, and I am getting the following error message:

Symfony\Component\Routing\Exception\RouteNotFoundException: Route "entity.taxonomy_term.revision" does not exist. in Drupal\Core\Routing\RouteProvider->getRouteByName() (line 206 of /var/www/docroot/core/lib/Drupal/Core/Routing/RouteProvider.php).

Steps to reproduce

Install and enable the module, navigate to any taxonomy revisions page: /taxonomy/{nid}/revisions

Proposed resolution

It looks like the main route is named: "entity.taxonomy_term.version_history" in taxonomy_revisions_ui.routing.yml

But on line 118 of src/Controller/TaxonomyRevisionController.php this route is specified: "entity.taxonomy_term.revision"

That route only appears in the Controller and in src/Routing/RouteSubscriber.php on line 17.

I'm assuming "entity.taxonomy_term.revision" and entity.taxonomy_term.version_history" are meant to be the same route, so they should be updated to all match.

I've tested on one of my local environments and it looks like updating the Controller and RouteSubscriber to use "entity.taxonomy_term.version_history" fixes the issue.

🐛 Bug report
Status

RTBC

Version

2.1

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024