- Issue created by @Nelo_Drup
- 🇺🇸United States Chad Ketchum
I'm having the same issue. My log Message Symfony\Component\Routing\Exception\RouteNotFoundException: Route "entity.file.edit_form" does not exist. in Drupal\Core\Routing\RouteProvider->getRouteByName() (line 208 of /var/www/html/docroot/core/lib/Drupal/Core/Routing/RouteProvider.php).
Severity ErrorOperations
Backtrace
#0 /var/www/html/docroot/core/lib/Drupal/Core/Routing/UrlGenerator.php(443): Drupal\Core\Routing\RouteProvider->getRouteByName()
#1 /var/www/html/docroot/core/lib/Drupal/Core/Routing/UrlGenerator.php(276): Drupal\Core\Routing\UrlGenerator->getRoute()
#2 /var/www/html/docroot/core/lib/Drupal/Core/Render/MetadataBubblingUrlGenerator.php(108): Drupal\Core\Routing\UrlGenerator->generateFromRoute()
#3 /var/www/html/docroot/core/lib/Drupal/Core/Url.php(765): Drupal\Core\Render\MetadataBubblingUrlGenerator->generateFromRoute()
#4 /var/www/html/docroot/core/lib/Drupal/Core/Controller/ControllerBase.php(270): Drupal\Core\Url->toString()
#5 /var/www/html/docroot/modules/contrib/entity_embed/src/Controller/EditEmbeddedEntity.php(22): Drupal\Core\Controller\ControllerBase->redirect()
#6 [internal function]: Drupal\entity_embed\Controller\EditEmbeddedEntity->edit()
#7 /var/www/html/docroot/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array()
#8 /var/www/html/docroot/core/lib/Drupal/Core/Render/Renderer.php(638): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#9 /var/www/html/docroot/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(121): Drupal\Core\Render\Renderer->executeInRenderContext()
#10 /var/www/html/docroot/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() in my case it happens spacificly when you click the cog Edit the Embedded Entity (Opens in new tab)
#11 /var/www/html/docroot/vendor/symfony/http-kernel/HttpKernel.php(181): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#12 /var/www/html/docroot/vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw()
#13 /var/www/html/docroot/core/lib/Drupal/Core/StackMiddleware/Session.php(53): Symfony\Component\HttpKernel\HttpKernel->handle()
#14 /var/www/html/docroot/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle()
#15 /var/www/html/docroot/core/lib/Drupal/Core/StackMiddleware/ContentLength.php(28): Drupal\Core\StackMiddleware\KernelPreHandle->handle()
#16 /var/www/html/docroot/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\ContentLength->handle()
#17 /var/www/html/docroot/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass()
#18 /var/www/html/docroot/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle()
#19 /var/www/html/docroot/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
#20 /var/www/html/docroot/core/lib/Drupal/Core/StackMiddleware/AjaxPageState.php(36): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
#21 /var/www/html/docroot/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(51): Drupal\Core\StackMiddleware\AjaxPageState->handle()
#22 /var/www/html/docroot/core/lib/Drupal/Core/DrupalKernel.php(741): Drupal\Core\StackMiddleware\StackedHttpKernel->handle()
#23 /var/www/html/docroot/index.php(19): Drupal\Core\DrupalKernel->handle()
#24 {main} - 🇭🇺Hungary Balu Ertl Budapest 🇪🇺
Balu Ertl → made their first commit to this issue’s fork.
- Merge request !39Resolve #3416512 "Route validation in EditEmbeddedEntity controller" → (Open) created by Balu Ertl
- 🇭🇺Hungary Balu Ertl Budapest 🇪🇺
Balu Ertl → changed the visibility of the branch 3416512-error-after-updating to hidden.
- 🇭🇺Hungary Balu Ertl Budapest 🇪🇺
As it turned out, it has nothing to do neither with the core version upgrade nor with entity_browser module so we can rule them out from debugging. After testing on both 10.1.x and 10.2.x core versions I found the root cause of the issue, so updating the ticket summary accordingly.
- Status changed to Needs review
4 months ago 1:35pm 15 July 2024 - 🇭🇺Hungary Balu Ertl Budapest 🇪🇺
In my MR, I suggest following a somewhat different approach: instead of juggling with raw route names while handling the risk of their inexistence, why not ask the entity instance itself about their operation links?
Also, in the very unlikely situation, if still have not found any viable route to redirect, we can resort to displaying a plain text message notifying the user about nothing wrong they did, but the embedded entity has some limitations.