Route "entity.path_alias.collection" does not exist

Created on 17 December 2021, about 3 years ago
Updated 18 September 2023, over 1 year ago

Problem/Motivation

I get the following error when a content it's created or I'm clearing the cache, but only sometimes and Drupal shows me "The website encountered an unexpected error. Please try again later."

This is the error: "Symfony\Component\Routing\Exception\RouteNotFoundException: Route "entity.path_alias.collection" does not exist. in Drupal\Core\Routing\RouteProvider->getRouteByName() (line 208 of /code/web/core/lib/Drupal/Core/Routing/RouteProvider.php)"

I'm able to fix it with a new clear cache and I'm able to reproduce it only on one environment.

I'm using Drupal 8.9.10 and PathAuto 1.8

I have the tables path_alias and path_alias_revision in DB and in Drupal are no db updates available.

Steps to reproduce

It's really random. By creating content or by clearing the cache and only sometimes it shows the error.

πŸ’¬ Support request
Status

Fixed

Version

1.0

Component

Code

Created by

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States andysipple

    We also got this error on a recent build.
    Symfony\Component\Routing\Exception\RouteNotFoundException: Noticed exception 'Symfony\Component\Routing\Exception\RouteNotFoundException' with message 'Route "entity.path_alias.collection" does not exist.' in /code/web/core/lib/Drupal/Core/Routing/RouteProvider.php:206
    in Drupal\Core\Routing\RouteProvider::getRouteByName called at /code/web/core/lib/Drupal/Core/Routing/UrlGenerator.php (432)
    in Drupal\Core\Routing\UrlGenerator::getRoute called at /code/web/core/lib/Drupal/Core/Routing/UrlGenerator.php (129)

    Adding patch #27 πŸ› ModuleHandler skips all hook implementations when invoked before the module files have been loaded Needs review
    Thank you @andriy-parkhomiuk for pointing me to the core issue.

Production build 0.71.5 2024