Recently got a new client and their website modules had not been updated in a while. I'm currently having an issue updating Webforms.
Someone in their organization (or previous web developer) decided it would be a good idea to move the Webform menu items under "Content". I placed it back where it should be under "Structure" in the admin menu.
I tried updating Webforms using the UI and using drush, I'm consistently getting this error:
The website encountered an unexpected error. Please try again later.Symfony\Component\Routing\Exception\RouteNotFoundException: Route "webform.about" does not exist. in Drupal\Core\Routing\RouteProvider->getRouteByName() (line 201 of core/lib/Drupal/Core/Routing/RouteProvider.php).
Drupal\Core\Routing\UrlGenerator->getRoute('webform.about') (Line: 130)
Drupal\Core\Routing\UrlGenerator->getPathFromRoute('webform.about', Array) (Line: 68)
Drupal\Core\Render\MetadataBubblingUrlGenerator->getPathFromRoute('webform.about', Array) (Line: 790)
Drupal\Core\Url->getInternalPath() (Line: 135)
Drupal\Core\Utility\LinkGenerator->generate('About', Object) (Line: 94)
Drupal\Core\Render\Element\Link::preRenderLink(Array)
I tried uninstalling the module as well and I get the same message. I tried to re-install Webforms using drush but still getting the same error.
Current version of Webforms on client site is version: '8.x-5.0-beta24'. I'm trying to update to 8.x-5.1.
After both updating the module and re-installing it I get tried 'drush cr' but the error message is still there.
Any ideas on how to fix this? Any help would be appreciated.
Thanks!
| Comment | File | Size | Author |
|---|---|---|---|
| #13 | Screen Shot 2020-08-18 at 5.55.40 AM.png | 165.48 KB | jrockowitz |
| #6 | webform-menu.jpeg | 72.01 KB | jeffmasigan |
| #5 | Edit menu Administration Webform Demo Site.png | 103.56 KB | jrockowitz |
Comments
Comment #2
jrockowitz commentedThe 'webform.about' route was removed, my only guess is there is a menu item that is pointing to this old route.
The below query should show you ever webform route in the menu tree. Does the query return the 'webform.about' route?
SELECT * FROM `menu_tree` WHERE route_name LIKE 'webform%'Comment #3
jeffmasigan commentedyes it does. it shows these under route_name
webform.about
webform.addons
webform.config
webform.element_plugins
webform.reports_plugins.elements
Comment #4
jeffmasigan commentedIt looks like it happens whenever 'webform.about' is rendered in the admin menu. I removed the content area in the template for the admin menu block and the page renders without errors. I'm not sure how fix / rebuild the webforms menu items. Any suggestions?
Comment #5
jrockowitz commentedBefore you do the webform module update try resetting all Webform items in the admin menu (/admin/structure/menu/manage/admin).
Comment #6
jeffmasigan commentedI don't see that option any more. That's what I used to get them back to where they are now (under Structure).
Comment #7
jrockowitz commentedYou can try deleting after the update via
DELETE FROM `menu_tree` WHERE route_name='webform.about'Comment #8
jeffmasigan commentedIt worked!
After running that on the DB and clearing the cache I got the same message but for a different variable - 'webform.element_plugins'
The website encountered an unexpected error. Please try again later.Symfony\Component\Routing\Exception\RouteNotFoundException: Route "webform.element_plugins" does not exist. in Drupal\Core\Routing\RouteProvider->getRouteByName() (line 201 of core/lib/Drupal/Core/Routing/RouteProvider.php).
Drupal\Core\Routing\UrlGenerator->getRoute('webform.element_plugins') (Line: 130) so i ran this on the DBand cleared cache.. now it works!
Thanks so much for the help!
Comment #9
jrockowitz commentedComment #11
Kavya-2627 commentedwhen i go to webforms and select build option on any of the webform the error msg say "The website encountered an unexpected error. Please try again later." is been popping up.
by referring other issue blog i added a line of code in settings.php [$config['system.logging']['error_level'] = 'verbose';]
which gave me the error description like below
" The website encountered an unexpected error. Please try again later.Symfony\Component\Routing\Exception\RouteNotFoundException: Route "entity.webform_ui.element.add_page" does not exist. in Drupal\Core\Routing\RouteProvider->getRouteByName() (line 203 of core/lib/Drupal/Core/Routing/RouteProvider.php).
Drupal\Core\Menu\LocalActionDefault->getRouteParameters(Object) (Line: 183) Drupal\Core\Menu\LocalActionManager->getActionsForRoute('entity.webform.edit_form') (Line: 80) Drupal\Core\Menu\Plugin\Block\LocalActionsBlock->build() (Line: 203) Drupal\block\BlockViewBuilder::preRender(Array) call_user_func('Drupal\block\BlockViewBuilder::preRender', Array) (Line: 378) Drupal\Core\Render\Renderer->doRender(Array) (Line: 450) Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 195) Drupal\Core\Render\Renderer->render(Array) (Line: 490) Drupal\Core\Template\TwigExtension->escapeFilter(Object, Array, 'html', NULL, 1) (Line: 81) __TwigTemplate_f8a17f041581af9829850fd45db45c2b69d8b3a60b80408d416da5d23dbccb61->doDisplay(Array, Array) (Line: 432) Twig_Template->displayWithErrorHandling(Array, Array) (Line: 403) Twig_Template->display(Array) (Line: 411) Twig_Template->render(Array) (Line: 64) twig_render_template('core/themes/seven/templates/page.html.twig', Array) (Line: 384) Drupal\Core\Theme\ThemeManager->render('page', Array) (Line: 437) Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 195) Drupal\Core\Render\Renderer->render(Array) (Line: 490) Drupal\Core\Template\TwigExtension->escapeFilter(Object, Array, 'html', NULL, 1) (Line: 90) __TwigTemplate_be8c7bbb9c824f2826368d7c8da984c6279779db72a67fd8056a00bb23b816f2->doDisplay(Array, Array) (Line: 432) Twig_Template->displayWithErrorHandling(Array, Array) (Line: 403) Twig_Template->display(Array) (Line: 411) Twig_Template->render(Array) (Line: 64) twig_render_template('core/themes/classy/templates/layout/html.html.twig', Array) (Line: 384) Drupal\Core\Theme\ThemeManager->render('html', Array) (Line: 437) Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 195) Drupal\Core\Render\Renderer->render(Array) (Line: 147) Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 582) 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: 99) Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 78) 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: 666) Drupal\Core\DrupalKernel->handle(Object) (Line: 19). "
and also queried for " SELECT * FROM `menu_tree` WHERE route_name LIKE 'webform%' "
but the database does not contain any record for the corresponding table.
pls suggest me how to get a solution for these??
Comment #12
jrockowitz commentedDid you try clearing Drupal's cache?
Comment #13
jrockowitz commentedThe
entity.webform_ui.element.add_pageroute is used by the Webform UI module's form builder.The devel module provides a tool to view all routes via /devel/routes.
Comment #14
Kavya-2627 commentedafter this issue occuring the whole website crashed, no other option were appearing rather than these error msgs. after rolling back by server support team, the website started working as prior. Still the issue persist.
in our website we are not using devel, what can be the possible solution to this issue.. i am afraid that trying anything would again put me into risk.
and sometimes the anonymous mail will be generated and sent to the registered email.
pls do suggest me some solution as sooner as possible..
Comment #15
jrockowitz commentedI recommend testing the updates on a dev server and paying for professional support.