I get the below error when i upgrade Drupal core from 8.8.0-beta1 and 8.8.0-rc1 and updating Pathauto from 8.x-1.6-alpha1 to 8.x-1.6-beta1

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

Comments

RobertoGuzman created an issue. See original summary.

dshields’s picture

I'm wrestling with this one as well

Berdir’s picture

Status: Active » Postponed (maintainer needs more info)

Did you run updates, is the path_alias module enabled?

RobertoGuzman’s picture

Berdir, yes, i run updte and clean the chache, and path_alias module is enable

Berdir’s picture

When exactly does the error happen? Do you have a backtrace?

RobertoGuzman’s picture

The error is only at the administration area

Berdir’s picture

Ok, on which pages exactly?

And can you set error handling to verbose and then post the full message? You can set it in settings.php with "$config['system.logging']['error_level'] = 'verbose';" if you can't access the backend anymore.

dshields’s picture

FYI: It seems this was brought up before as well: https://www.drupal.org/project/pathauto/issues/3088811#comment-13322754

RobertoGuzman’s picture

using "$config['system.logging']['error_level'] = 'verbose';" i get the below error

The website encountered an unexpected error. Please try again later.

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

Drupal\Core\Routing\UrlGenerator->getRoute('entity.path_alias.collection') (Line: 271)
Drupal\Core\Routing\UrlGenerator->generateFromRoute('entity.path_alias.collection', Array, Array, 1) (Line: 105)
Drupal\Core\Render\MetadataBubblingUrlGenerator->generateFromRoute('entity.path_alias.collection', Array, Array, 1) (Line: 754)
Drupal\Core\Url->toString(1) (Line: 174)
Drupal\Core\Utility\LinkGenerator->generate('URL aliases', Object) (Line: 63)
Drupal\Core\Utility\LinkGenerator->generateFromLink(Object) (Line: 138)
Drupal\Core\Link->toString() (Line: 29)
template_preprocess_admin_block_content(Array, 'admin_block_content', Array) (Line: 287)
Drupal\Core\Theme\ThemeManager->render('admin_block_content', Array) (Line: 431)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 200)
Drupal\Core\Render\Renderer->render(Array) (Line: 501)
Drupal\Core\Template\TwigExtension->escapeFilter(Object, Array, 'html', NULL, 1) (Line: 74)
__TwigTemplate_046bfb0180a424702f1c79de8956ee39342ca10e00ff7ae701e73be5d424b7f5->doDisplay(Array, Array) (Line: 455)
Twig\Template->displayWithErrorHandling(Array, Array) (Line: 422)
Twig\Template->display(Array) (Line: 434)
Twig\Template->render(Array) (Line: 64)
twig_render_template('core/themes/stable/templates/admin/admin-block.html.twig', Array) (Line: 384)
Drupal\Core\Theme\ThemeManager->render('admin_block', Array) (Line: 431)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 200)
Drupal\Core\Render\Renderer->render(Array) (Line: 501)
Drupal\Core\Template\TwigExtension->escapeFilter(Object, Array, 'html', NULL, 1) (Line: 76)
__TwigTemplate_6e1e4ffe92df6c45e48198228d94480214a54d11a3b896c04f328f54a4e9e982->doDisplay(Array, Array) (Line: 455)
Twig\Template->displayWithErrorHandling(Array, Array) (Line: 422)
Twig\Template->display(Array) (Line: 434)
Twig\Template->render(Array) (Line: 64)
twig_render_template('core/themes/stable/templates/admin/system-admin-index.html.twig', Array) (Line: 384)
Drupal\Core\Theme\ThemeManager->render('system_admin_index', Array) (Line: 431)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 200)
Drupal\Core\Render\Renderer->render(Array, ) (Line: 226)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 573)
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)
call_user_func(Array, Object, 'kernel.view', Object) (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object) (Line: 156)
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: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 50)
Drupal\ban\BanMiddleware->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: 694)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

Berdir’s picture

#8: That seems different as it is actually on 8.7.

#9: That's unrelated to pathauto as far as I see, you could try to uninstall it to confirm that (temporarily/on a test site)

RobertoGuzman’s picture

The error is caused by the menu "URL aliases" under the administration menu, the path for this menu is "/admin/structure/menu/link/entity.path_alias.collection"

here is the error

Administration
|_ Configuration
|_ Search and metadata
|_ URL aliases

RobertoGuzman’s picture

the error is fixed by installing the path_alias core module

Berdir’s picture

Category: Bug report » Support request
Priority: Critical » Normal
Status: Postponed (maintainer needs more info) » Fixed

Yes, that module not being installed is the obvious reason, although I'm not sure how you managed that? In #4 you said it was enabled?

Keep in mind that you *must not* import configuration after running updates. Update functions can make config changes, like installing modules and updating settings, and these must be kept. So the workflow for updating is to make sure you have the most recent configuration exported, then run updates, then export the config changes. And then import that updated configuration on the live site, although even that can be problematic with update functions that create new config. The safest option is not to mix config changes and updates.

Anyway, unless someone else has a different backtrace that's actually coming from pathauto somehow, which I really couldn't imagine, this is not a bug, so changing to a support request. If you can reproduce an upgrade without having path_alias enabled then you could open a core issue.

cmoeser’s picture

Same issue here after upgrading to 8.8. Core path module is enabled.

Symfony\Component\Routing\Exception\RouteNotFoundException: Route "entity.path_alias.collection" does not exist. in Drupal\Core\Routing\RouteProvider->getRouteByName() (line 208 of core\lib\Drupal\Core\Routing\RouteProvider.php).
Drupal\path\Routing\RouteProcessor->processOutbound('path.admin_overview', Object, Array, NULL) (Line: 52)
Drupal\Core\RouteProcessor\RouteProcessorManager->processOutbound('path.admin_overview', Object, Array, NULL) (Line: 405)
Drupal\Core\Routing\UrlGenerator->processRoute('path.admin_overview', Object, Array) (Line: 132)
Drupal\Core\Routing\UrlGenerator->getPathFromRoute('path.admin_overview', Array) (Line: 68)
Drupal\Core\Render\MetadataBubblingUrlGenerator->getPathFromRoute('path.admin_overview', Array) (Line: 791)
Drupal\Core\Url->getInternalPath() (Line: 135)
Drupal\Core\Utility\LinkGenerator->generate('URL aliases', Object) (Line: 95)
Drupal\Core\Render\Element\Link::preRenderLink(Array)
call_user_func_array(Array, Array) (Line: 100)
Drupal\Core\Render\Renderer->doTrustedCallback(Array, Array, 'Render #pre_render callbacks must be methods of a class that implements \Drupal\Core\Security\TrustedCallbackInterface or be an anonymous function. The callback was %s. Support for this callback implementation is deprecated in 8.8.0 and will be removed in Drupal 9.0.0. See https://www.drupal.org/node/2966725', 'silenced_deprecation', 'Drupal\Core\Render\Element\RenderCallbackInterface') (Line: 781)
Drupal\Core\Render\Renderer->doCallback('#pre_render', Array, Array) (Line: 372)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 200)
Drupal\Core\Render\Renderer->render(Array) (Line: 501)
Drupal\Core\Template\TwigExtension->escapeFilter(Object, Array, 'html', NULL, 1) (Line: 117)
__TwigTemplate_17eedc082aa41153cc703c5e7e7544aa44947c3ddcd6b1276f1ac0961f0d91c3->getmenu_links(Array, Object, 1) (Line: 124)
__TwigTemplate_17eedc082aa41153cc703c5e7e7544aa44947c3ddcd6b1276f1ac0961f0d91c3->getmenu_links(Array, Object, 0) (Line: 60)
__TwigTemplate_17eedc082aa41153cc703c5e7e7544aa44947c3ddcd6b1276f1ac0961f0d91c3->doDisplay(Array, Array) (Line: 455)
Twig\Template->displayWithErrorHandling(Array, Array) (Line: 422)
Twig\Template->display(Array) (Line: 434)
Twig\Template->render(Array) (Line: 64)
twig_render_template('core/themes/stable/templates/navigation/menu--toolbar.html.twig', Array) (Line: 384)
Drupal\Core\Theme\ThemeManager->render('menu__toolbar', Array) (Line: 431)
Drupal\Core\Render\Renderer->doRender(Array, 1) (Line: 200)
Drupal\Core\Render\Renderer->render(Array, 1) (Line: 156)
Drupal\Core\Render\Renderer->Drupal\Core\Render\{closure}() (Line: 573)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 157)
Drupal\Core\Render\Renderer->renderPlain(Array) (Line: 115)
Drupal\toolbar\Controller\ToolbarController::preRenderGetRenderedSubtrees(Array)
call_user_func_array(Array, Array) (Line: 100)
Drupal\Core\Render\Renderer->doTrustedCallback(Array, Array, 'Render #pre_render callbacks must be methods of a class that implements \Drupal\Core\Security\TrustedCallbackInterface or be an anonymous function. The callback was %s. Support for this callback implementation is deprecated in 8.8.0 and will be removed in Drupal 9.0.0. See https://www.drupal.org/node/2966725', 'silenced_deprecation', 'Drupal\Core\Render\Element\RenderCallbackInterface') (Line: 781)
Drupal\Core\Render\Renderer->doCallback('#pre_render', Array, Array) (Line: 372)
Drupal\Core\Render\Renderer->doRender(Array, 1) (Line: 200)
Drupal\Core\Render\Renderer->render(Array, 1) (Line: 156)
Drupal\Core\Render\Renderer->Drupal\Core\Render\{closure}() (Line: 573)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 157)
Drupal\Core\Render\Renderer->renderPlain(Array) (Line: 299)
toolbar_get_rendered_subtrees() (Line: 324)
_toolbar_get_subtrees_hash() (Line: 167)
toolbar_toolbar()
call_user_func_array('toolbar_toolbar', Array) (Line: 403)
Drupal\Core\Extension\ModuleHandler->invokeAll('toolbar') (Line: 81)
Drupal\toolbar\Element\Toolbar::preRenderToolbar(Array)
call_user_func_array(Array, Array) (Line: 100)
Drupal\Core\Render\Renderer->doTrustedCallback(Array, Array, 'Render #pre_render callbacks must be methods of a class that implements \Drupal\Core\Security\TrustedCallbackInterface or be an anonymous function. The callback was %s. Support for this callback implementation is deprecated in 8.8.0 and will be removed in Drupal 9.0.0. See https://www.drupal.org/node/2966725', 'silenced_deprecation', 'Drupal\Core\Render\Element\RenderCallbackInterface') (Line: 781)
Drupal\Core\Render\Renderer->doCallback('#pre_render', Array, Array) (Line: 372)
Drupal\Core\Render\Renderer->doRender(Array) (Line: 444)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 200)
Drupal\Core\Render\Renderer->render(Array) (Line: 501)
Drupal\Core\Template\TwigExtension->escapeFilter(Object, Array, 'html', NULL, 1) (Line: 129)
__TwigTemplate_e2a4caca8a265ef14ac364a9a54881c88cd4059df46feaa4bc5eab55c5a489da->doDisplay(Array, Array) (Line: 455)
Twig\Template->displayWithErrorHandling(Array, Array) (Line: 422)
Twig\Template->display(Array) (Line: 434)
Twig\Template->render(Array) (Line: 64)
twig_render_template('themes/custom/sany/templates/layout/html.html.twig', Array) (Line: 384)
Drupal\Core\Theme\ThemeManager->render('html', Array) (Line: 431)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 200)
Drupal\Core\Render\Renderer->render(Array) (Line: 147)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 573)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 148)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object)
call_user_func(Array, Object, 'kernel.view', Object) (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object) (Line: 156)
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: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
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: 694)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

cmoeser’s picture

Sorry fixed by running update.php which installs "path_alias" which is different than the core "path" module.

dalpasso’s picture

#15 I was unable to load update.php post update to core 8.8 as all authenticated pages were broken with the 'drupal.path_alias' doesn't exist error. Pathauto 1.6 installed prior as advised, no drush.

The trick was to have a browser page open on update.php, update core files manually then click the update button on update.php without refresh. This installed path_alias and other updates. Site seems to be working again so far and aliases are being generated and working.

hedi_loup’s picture

fixed by running update.php

pranavpathak’s picture

My sites were also down after Drupal core update 8.8.0. Manually run update.php did not help in my case instead I used drush updb (drush update) command and that helped.

Toki’s picture

Same error after upgrading from 8.7.10 to 8.8 (Route "entity.path_alias.collection" does not exist)

Fixed with drush updb

...

system module : 
  8801 -   Remove 'path.temporary' config if redundant. 
  8802 -   Fix system.theme:admin when the default theme is used as the admin theme. 
  8803 -   Install the 'path_alias' entity type. 
  8804 -   Convert path aliases to entities. 
  8805 -   Change the provider of the 'path_alias' entity type and its base fields. 

...

Without this, I had only WSOD (Pathauto has been updated simultaneously with 8.8 upgrade, maybe it would have been better to update it before as recommended on the Drupal 8.8 page)

binnythomas’s picture

I too faced the same issue and drush updatedb was the solution.

jpoesen’s picture

Had this issue too.

What fixed it for me:

* enable the path_alias module
* update the pathauto module
* run drush updb

Status: Fixed » Closed (fixed)

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

benroy’s picture

Thanks jpoesen, your trick works for me too

makbul_khan8’s picture

Drush updb helps!!
Thanks :)

emofsnead’s picture

I just had the same error occur moving from 8.7 to 8.8.4 and this solution fixed it for me in that update as well.

My prior site would not open and generated the verbose errors (which I found a match via search to the above comments). So I went into the site directory and did the following:

* installed pathauto module via composer from the command line
* ran drush updb

Saved my bacon! Thanks for the tip.

chema_’s picture

same issue here when I try to log in as administrator. I have tried everything you say but no positive result. any idea?

edit: after new DB update finally I got it!
In this update the path_alias entity type has been installed.

rondog469’s picture

This is a weird one. I moved my prod DB down to my dev environment and all was well on dev. I sql-sync'd from dev down to my local and this error popped up. I did not have any database updates as I had applied them on production when we upgraded to drupal 9.

My local was throwing this error. I tried drush updb on my local and it said no database updates. I browsed to mysite.local/update.php and that loaded up the update page, but again...no database updates. After hitting the update.php page my site finally worked again on my local.

Berdir’s picture

A common thing is that production has either no cache tables or has very old values in there because it is using redis/memcache or another cache backend, and locally you use the database, so you suddenly might have very stale caches. Try to manually empty all cache tables on production to avoid this in the future.

Just a guess, could also be something else, but I've run into that a few times.