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! 


Comments

jeffmasigan created an issue. See original summary.

jrockowitz’s picture

Status: Active » Postponed (maintainer needs more info)

The '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%'

jeffmasigan’s picture

yes it does. it shows these under route_name

webform.about
webform.addons
webform.config
webform.element_plugins
webform.reports_plugins.elements

jeffmasigan’s picture

It 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?

jrockowitz’s picture

Before you do the webform module update try resetting all Webform items in the admin menu (/admin/structure/menu/manage/admin).

jeffmasigan’s picture

StatusFileSize
new72.01 KB

I don't see that option any more. That's what I used to get them back to where they are now (under Structure).

Only local images are allowed.

jrockowitz’s picture

You can try deleting after the update via

DELETE FROM `menu_tree` WHERE route_name='webform.about'

jeffmasigan’s picture

It 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 DB 
DELETE FROM `menu_tree` WHERE route_name='webform.element_plugins'

and cleared cache.. now it works!

Thanks so much for the help!

jrockowitz’s picture

Status: Postponed (maintainer needs more info) » Fixed

Status: Fixed » Closed (fixed)

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

Kavya-2627’s picture

when 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??

jrockowitz’s picture

Did you try clearing Drupal's cache?

jrockowitz’s picture

StatusFileSize
new165.48 KB

The entity.webform_ui.element.add_page route is used by the Webform UI module's form builder.

The devel module provides a tool to view all routes via /devel/routes.

Kavya-2627’s picture

after 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..

jrockowitz’s picture

I recommend testing the updates on a dev server and paying for professional support.