就像标题所说,一切都按预期工作,直到我从 9.2.15 升级到 9.3.15 它是基于作曲家的安装。
当我尝试访问其中一个路径时,第一个路径给了我这个
网站遇到意外错误。请稍后重试。
SymfonyComponentRoutingExceptionRouteNotFoundException:路由“user.admin_permissions.module”不存在。在 DrupalCoreRoutingRouteProvider->getRouteByName() 中(core/lib/Drupal/Core/Routing/RouteProvider.php 第 206 行)。
人员选项给了我这个:
The website encountered an unexpected error. Please try again later. SymfonyComponentRoutingExceptionRouteNotFoundException: Route "user.role.settings" does not exist. in DrupalCoreRoutingRouteProvider->getRouteByName() (line 206 of core/lib/Drupal/Core/Routing/RouteProvider.php).
作曲家没有错误,任何日志中都没有错误,尽管这出现在我的 access.log 中
- [06/Jun/2022:15:06:56 +0000] "GET /admin/people/permissions HTTP/1.0" 500 3053 "https://d9d.text-based.net/admin/people/permissions/administrator" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:99.0) Gecko/20100101 Firefox/99.0"
以下是页面上显示的完整错误:
The website encountered an unexpected error. Please try again later. SymfonyComponentRoutingExceptionRouteNotFoundException: Route "user.role.settings" does not exist. in DrupalCoreRoutingRouteProvider->getRouteByName() (line 206 of core/lib/Drupal/Core/Routing/RouteProvider.php). DrupalCoreMenuLocalTaskDefault->getRouteParameters() (Line: 310) DrupalCoreMenuLocalTaskManager->getTasksBuild() (Line: 358) DrupalCoreMenuLocalTaskManager->getLocalTasks() (Line: 95) DrupalCoreMenuPluginBlockLocalTasksBlock->build() (Line: 171) DrupalblockBlockViewBuilder::preRender() call_user_func_array() (Line: 101) DrupalCoreRenderRenderer->doTrustedCallback() (Line: 772) DrupalCoreRenderRenderer->doCallback() (Line: 363) DrupalCoreRenderRenderer->doRender() (Line: 435) DrupalCoreRenderRenderer->doRender() (Line: 201) DrupalCoreRenderRenderer->render() (Line: 463) DrupalCoreTemplateTwigExtension->escapeFilter() (Line: 43) __TwigTemplate_00188c1691be8aad1e9679a8355ec8b1aad8fb0e1a0552901f64354cc31fc535->doDisplay() (Line: 405) TwigTemplate->displayWithErrorHandling() (Line: 378) TwigTemplate->display() (Line: 390) TwigTemplate->render() (Line: 55) twig_render_template() (Line: 384) DrupalCoreThemeThemeManager->render() (Line: 422) DrupalCoreRenderRenderer->doRender() (Line: 201) DrupalCoreRenderRenderer->render() (Line: 463) DrupalCoreTemplateTwigExtension->escapeFilter() (Line: 86) __TwigTemplate_52bf370994174cae6411a160df9bc52e747d5a7e02be204f64e1e34dad454a33->doDisplay() (Line: 405) TwigTemplate->displayWithErrorHandling() (Line: 378) TwigTemplate->display() (Line: 390) TwigTemplate->render() (Line: 55) twig_render_template() (Line: 384) DrupalCoreThemeThemeManager->render() (Line: 422) DrupalCoreRenderRenderer->doRender() (Line: 201) DrupalCoreRenderRenderer->render() (Line: 162) DrupalCoreRenderMainContentHtmlRenderer->DrupalCoreRenderMainContent{closure}() (Line: 564) DrupalCoreRenderRenderer->executeInRenderContext() (Line: 163) DrupalCoreRenderMainContentHtmlRenderer->renderResponse() (Line: 90) DrupalCoreEventSubscriberMainContentViewSubscriber->onViewRenderArray() call_user_func() (Line: 142) DrupalComponentEventDispatcherContainerAwareEventDispatcher->dispatch() (Line: 163) SymfonyComponentHttpKernelHttpKernel->handleRaw() (Line: 80) SymfonyComponentHttpKernelHttpKernel->handle() (Line: 58) DrupalCoreStackMiddlewareSession->handle() (Line: 48) DrupalCoreStackMiddlewareKernelPreHandle->handle() (Line: 48) DrupalCoreStackMiddlewareReverseProxyMiddleware->handle() (Line: 51) DrupalCoreStackMiddlewareNegotiationMiddleware->handle() (Line: 23) StackStackedHttpKernel->handle() (Line: 708) DrupalCoreDrupalKernel->handle() (Line: 19)
Composer 在更新时没有显示错误,我还通过 drush 更新了数据库。任何日志中也没有错误。
不是 100% 确定是什么修复了它,但我从备份中恢复并从 8.9.18 重新启动并清理了我的模块文件夹。一些模块是通过 drupal UI 安装的,仅在我的模块文件夹中,而不是在 module/contrib 中,因此我卸载了这些模块并将它们从模块文件夹中删除,然后通过 Composer 重新安装并启用它们。之后,我清理了缓存并执行了 drush updb,然后像之前一样继续升级到 9。然后就成功了。