Error after updating to drupal 10.2.2

Created on 23 January 2024, about 1 year ago

Problem/Motivation

Error after updating to drupal 10.2.2 and the steps to reproduce are as follows:

Just insert an entity with entity browser, in this case an image, then click or double click on it and this error will appear

FastCGI sent in stderr: "PHP message: Uncaught PHP Exception Symfony\Component\Routing\Exception\RouteNotFoundException: "Route "entity.file.edit_form" does not exist." at /var/www/example.com/core/lib/Drupal/Core/Routing/RouteProvider.php line 206" while reading response header from upstream, client: 100.6.43.78, server: example.com, request: "GET /entity-embed/edit-embedded/file/ffa0e0e8-e740-461a-be3e-1e1c98fb7a75 HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php8.1-fpm.sock:", host: "example.com", referrer: "https://example.com/node/246/edit"

๐Ÿ› Bug report
Status

Active

Version

1.5

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • 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 Error

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

  • ๐Ÿ‡ญ๐Ÿ‡บ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.

  • ๐Ÿ‡ญ๐Ÿ‡บHungary Balu Ertl Budapest ๐Ÿ‡ช๐Ÿ‡บ
  • Status changed to Needs review 9 months ago
  • ๐Ÿ‡ญ๐Ÿ‡บ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.

  • Pipeline finished with Failed
    9 months ago
    Total: 903s
    #224713
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States devanbicher

    This patch for me does indeed fix the Route "entity.file.edit_form" does not exist type errors. However for our use with paragraph library items, it introduces a new issue, which is that the cog wheel, as seen in the image at the top, is now active and clickable.

    Clicking on it takes you to a white page with a message that says something like:

    The type (paragraph) of the embedded entity (PARAGRAPH LIBRARY LABEL > Paragraphs, ID: 123456) does not support neither editing nor canonical linking mode.

    While this fixes the error from occurring, it introduces a user editing experience that is worse than the original problem, from my testing.

  • First commit to issue fork.
  • Pipeline finished with Failed
    3 days ago
    Total: 270s
    #461824
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States sethhill

    devanbicher, MR58 endeavors to address Paragraphs Library items by determining if the attached paragraph is within another entity. I am noticing in testing that the edit links seem to be incorrect when there are multiple items embeddedโ€”they always seem to get the uuid of the first item in the list.

  • Pipeline finished with Canceled
    2 days ago
    Total: 157s
    #462631
  • Pipeline finished with Failed
    2 days ago
    Total: 150s
    #462633
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States sethhill

    Updated MR!58 with changes to CKEditor that allow editing when multiple embeds are in a single field. Noting that this MR also incorporates earlier changes from BaluErtl in MR39.

Production build 0.71.5 2024