Compatibility issue: Route update.theme_install does not exist in Drupal 11.0.x

Created on 13 December 2024, 5 months ago

Problem/Motivation
The "Admin Toolbar Tools" module version 3.5.0 references a non-existent route `update.theme_install` in its `ExtraLinks.php` file. This results in a `Symfony\Component\Routing\Exception\RouteNotFoundException` when accessing the administration menu at `/admin/structure/menu/manage/admin` in Drupal 11.0.x.
Steps to reproduce
1. Install Drupal 11.0.x and Admin Toolbar version 3.5.0, including the Admin Toolbar Tools submodule. 2. Enable the `admin_toolbar_tools` module. 3. Navigate to `/admin/structure/menu/manage/admin`. 4. Observe the error: `Route "update.theme_install" does not exist`.
Proposed resolution
Remove or comment out the reference to the non-existent route `update.theme_install` in the `AdminToolbarTools\Plugin\Derivative\ExtraLinks` class. Alternatively, check for the existence of the route before adding it to the `$links` array.
Remaining tasks
1. Remove or fix the code referencing `update.theme_install` in `ExtraLinks.php`. 2. Test the proposed patch to ensure no regressions occur. 3. Write a test to verify that only existing routes are added by `ExtraLinks.php`.
User interface changes
There are no direct user interface changes, but the menu items added by Admin Toolbar Tools will no longer include links to the non-existent `update.theme_install` route.
Introduced terminology
No new terminology introduced.
API changes
No API changes expected.
Data model changes
No data model changes.
Release notes snippet
In Admin Toolbar Tools 3.5.1, the reference to the non-existent route `update.theme_install` has been removed. This resolves a `RouteNotFoundException` error when accessing the administration menu in Drupal 11.0.x.
Original report by estoclet
When navigating to `/admin/structure/menu/manage/admin` in Drupal 11.0.x with Admin Toolbar Tools 3.5.0 enabled, a `Symfony\Component\Routing\Exception\RouteNotFoundException` is triggered due to a reference to a non-existent route `update.theme_install`. This issue affects users with the `admin_toolbar_tools` module enabled and prevents accessing certain administration pages.

๐Ÿ› Bug report
Status

Active

Version

3.5

Component

Code

Created by

๐Ÿ‡ซ๐Ÿ‡ทFrance estoclet

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

Merge Requests

Comments & Activities

  • Issue created by @estoclet
  • ๐Ÿ‡ซ๐Ÿ‡ทFrance luminess_dale

    Patch to check for existing route before adding it to the menu.

  • ๐Ÿ‡ซ๐Ÿ‡ทFrance paul_serval

    Patch reroll for 3.5.1

  • Iโ€™ve updated ExtraLinks.php to check for the update.theme_install route before adding it, resolving the RouteNotFoundException error in Drupal 11.0.x. Please review the changes.

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States sassafrass

    I am experiencing this issue with Drupal 10.3 and 10.4, with Admin Toolbar 3.5.1. The patches provided do not apply.

  • ๐Ÿ‡ต๐Ÿ‡ชPeru alyaj2a

    In my case, I have Admin Toolbar Tools version 3.0.5 and Drupal 11.0.1, but I don't have this problem.

  • ๐Ÿ‡จ๐Ÿ‡ฆCanada leducdubleuet Chicoutimi QC

    I can confirm the patch in comment #4 called admin_toolbar_3493798_4.patch is working well for version 3.5.1 of this module under Drupal 10.4.0.

    And the one in comment #6 called compatibility-issue-update.3493798.patch does not fix the issue under Drupal 10.4.0.

    I put this back to needs work since the right approach needs to be determined.

    Thank you very much!

  • ๐Ÿ‡ท๐Ÿ‡บRussia nikit

    Confirming that #4 work for 3.5.1 Drupal 10.4.0.

  • ๐Ÿ‡จ๐Ÿ‡ฆCanada joelseguin Ontario, Canada

    I'm confirming that #4 worked as well (running D10.4.0 and Admin Toolbar 3.5.1). No luck with #6.

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States rjw

    Also confirming that #4 work for Admin Toolbar 3.5.1 and Drupal 10.4.0.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia akulsaxena

    Confirming that #4 work for Admin Toolbar 3.5.1 and Drupal 10.
    #6 didnt work for me

  • First commit to issue fork.
  • Pipeline finished with Failed
    4 months ago
    Total: 385s
    #398068
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia shivam_tiwari

    According to the right way, we are using MRs. So I created MR 110. Need to work here for resolve test failure issue.

  • The #4 is working for Admin Toolbar 3.5.1 and Drupal 10.4.0. #6 is not working. When navigating to `/admin/structure/menu/manage/admin the same error was coming. I followed these steps:

    1. Disabled the deprecated Admin Toolbar Links Access Filter and Admin Toolbar Extra Tools
    2. I upgraded the admin toolbar from 3.4.0 to 3.5.1
    3. Applied #4 admin_toolbar_3493798_4.patch
    4. Reenabled the Admin Toolbar Extra Tools module, this worked!

    Post drupal core update 10.4.0, few of the admin navigation menus were missing, these were migrated ones might be due to that, readding them fixed it.

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States aangel

    For my composer-based install, I think in my situation there was something lingering (a block from admin_toolbar_tools? see the backtrace below) that referenced the update.links.action.yml file because I did everything I could think of before the final step below. (I had restored the Upgrade Manager module thinking that would help but it turned out to make things worse.)

    In any case, I:

    • removed the update module entry by editing the config table
    • cleared every cache I could think of
    • reviewed the menu_tree table
    • reviewed router table
    • reviewed the plugin definitions
    • applied both patch #4 and #6 from Compatibility issue: Route update.theme_install does not exist in Drupal 11.0.x & 10.4.x
    • and likely other things I'm not remembering.

    It wasn't until I completely erased the contents of update.links.action.yml that that I could pull up /admin/modulesโ€”even though the module was uninstalled (but present on the filesystem).

    Perhaps this will help someone who painted themselves into the same corner I did.

    Below is the backtrace from the failure in RouteProvider.php ("Route "update.module_install" does not exist."):

    #0 /code/web/core/lib/Drupal/Core/Menu/LocalActionDefault.php(87): Drupal\Core\Routing\RouteProvider->getRouteByName('update.module_i...')
    #1 /code/web/core/lib/Drupal/Core/Menu/LocalActionManager.php(192): Drupal\Core\Menu\LocalActionDefault->getRouteParameters(Object(Drupal\Core\Routing\CurrentRouteMatch))
    #2 /code/web/core/lib/Drupal/Core/Menu/Plugin/Block/LocalActionsBlock.php(81): Drupal\Core\Menu\LocalActionManager->getActionsForRoute('system.modules_...')
    #3 /code/web/core/modules/block/src/BlockViewBuilder.php(171): Drupal\Core\Menu\Plugin\Block\LocalActionsBlock->build()
    #4 [internal function]: Drupal\block\BlockViewBuilder::preRender(Array)
    #5 /code/web/core/lib/Drupal/Core/Security/DoTrustedCallbackTrait.php(113): call_user_func_array('Drupal\\block\\Bl...', Array)
    #6 /code/web/core/lib/Drupal/Core/Render/Renderer.php(870): Drupal\Core\Render\Renderer->doTrustedCallback('Drupal\\block\\Bl...', Array, 'Render #pre_ren...', 'exception', 'Drupal\\Core\\Ren...')
    #7 /code/web/core/lib/Drupal/Core/Render/Renderer.php(432): Drupal\Core\Render\Renderer->doCallback('#pre_render', 'Drupal\\block\\Bl...', Array)
    #8 /code/web/core/lib/Drupal/Core/Render/Renderer.php(504): Drupal\Core\Render\Renderer->doRender(Array)
    #9 /code/web/core/lib/Drupal/Core/Render/Renderer.php(248): Drupal\Core\Render\Renderer->doRender(Array, false)
    #10 /code/web/core/lib/Drupal/Core/Template/TwigExtension.php(484): Drupal\Core\Render\Renderer->render(Array)
    #11 /files/php/twig/678ecf147c807_page.html.twig_CiIyKlwi1CiiVfhMLJjmz4BX0/98gFkY9cIZo0bQJ1_QGhaX98smPe7gsMtSAC39cdu-Y.php(90): Drupal\Core\Template\TwigExtension->escapeFilter(Object(Drupal\Core\Template\TwigEnvironment), Array, 'html', NULL, true)
    #12 /code/vendor/twig/twig/src/Template.php(387): __TwigTemplate_0e19dbed70a1ef5fd668bdace6bdbdce->doDisplay(Array, Array)
    #13 /code/vendor/twig/twig/src/Template.php(343): Twig\Template->yield(Array, Array)
    #14 /code/vendor/twig/twig/src/Template.php(358): Twig\Template->display(Array)
    #15 /code/vendor/twig/twig/src/TemplateWrapper.php(35): Twig\Template->render(Array)
    #16 /code/web/core/themes/engines/twig/twig.engine(33): Twig\TemplateWrapper->render(Array)
    #17 /code/web/core/lib/Drupal/Core/Theme/ThemeManager.php(348): twig_render_template('core/themes/cla...', Array)
    #18 /code/web/core/lib/Drupal/Core/Render/Renderer.php(491): Drupal\Core\Theme\ThemeManager->render('page', Array)
    #19 /code/web/core/lib/Drupal/Core/Render/Renderer.php(248): Drupal\Core\Render\Renderer->doRender(Array, false)
    #20 /code/web/core/lib/Drupal/Core/Template/TwigExtension.php(484): Drupal\Core\Render\Renderer->render(Array)
    #21 /files/php/twig/678ecf147c807_html.html.twig_5PuhOBihR5J2SomMX1OHMMKUe/aFbEDfVcpSz7WS-gVUQnxHFhmcE3cKm5zGMfYZWptOI.php(91): Drupal\Core\Template\TwigExtension->escapeFilter(Object(Drupal\Core\Template\TwigEnvironment), Array, 'html', NULL, true)
    #22 /code/vendor/twig/twig/src/Template.php(387): __TwigTemplate_28dda737252b4ec9e62e7e0f81eef67e->doDisplay(Array, Array)
    #23 /code/vendor/twig/twig/src/Template.php(343): Twig\Template->yield(Array, Array)
    #24 /code/vendor/twig/twig/src/Template.php(358): Twig\Template->display(Array)
    #25 /code/vendor/twig/twig/src/TemplateWrapper.php(35): Twig\Template->render(Array)
    #26 /code/web/core/themes/engines/twig/twig.engine(33): Twig\TemplateWrapper->render(Array)
    #27 /code/web/core/lib/Drupal/Core/Theme/ThemeManager.php(348): twig_render_template('core/themes/cla...', Array)
    <snip>
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States RoloDMonkey
  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany lmoeni

    I can also confirm that patch #4 and the MR solves the problem with Drupal 10.4.1 and Admin Toolbar 3.5.1.

  • ๐Ÿ‡ท๐Ÿ‡ชRรฉunion Martygraphie Saint-Denis (Rรฉunion)

    Hi,
    Patch #4 works fine !
    Thanks !

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States adrianm6254

    I was able to apply both #4 & #6 successfully. I will stay with #6.

  • Status changed to Needs work 3 months ago
  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany solimanharkas Hamburg

    I can reproduce the issue and Patch 4 fixed the issue.

  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany Anybody Porta Westfalica

    I can confirm this issue and think we should set the priority to major, as it results in a WSOD for site managers.

  • ๐Ÿ‡ฉ๐Ÿ‡ฐDenmark ressa Copenhagen

    I agree @anybody, it would be great to get this fixed ... To get Admin Toolbar commits done faster, you could consider becoming co-maintainer?

    Reformatting the Issue Summary, since all mark up was missing.

  • ๐Ÿ‡ฉ๐Ÿ‡ฐDenmark ressa Copenhagen

    And by the way, the failing test for this MR is a false positive, it's the dev-tests themselves that are failing, see ๐Ÿ› Fix automated tests Active .

    It looks like they have been failing since 13 November 2024, if you look under https://git.drupalcode.org/project/admin_toolbar/-/pipelines.

  • ๐Ÿ‡ฉ๐Ÿ‡ฐDenmark ressa Copenhagen
  • Pipeline finished with Success
    3 months ago
    Total: 390s
    #426878
  • ๐Ÿ‡ฉ๐Ÿ‡ฐDenmark ressa Copenhagen

    Current MR110 based on the patch from #4 seems to work for a lot of users, so changing status.

  • ๐Ÿ‡ซ๐Ÿ‡ทFrance dydave

    Thanks a lot everyone for the great help and @ressa in particular for pushing forward this issue.

    I haven't had the time to test this myself, but looking at all the comments above, it seemed safe enough to assume these changes have been tested successfully with D9.5+, D10 and D11, by many users.

    I've taken a quick look at MR!110 and it looked good, so I went ahead and got it merged above at #31.

    Marking this issue Fixed for now.

    Thanks in advance for your comments, replies and feedback!
    Cheers!

  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany Anybody Porta Westfalica

    @dydave thanks! Could you maybe tag a new release to get the WSOD away on production? :)

  • ๐Ÿ‡ซ๐Ÿ‡ทFrance dydave

    Thanks @anybody for the prompt and positive feedback!

    @ressa and @anybody:

    Any other tickets in the issue queue that should be processed before creating a new release?

    I've taken a quick look yesterday, but couldn't find anything significant or RTBC: it's mostly feature requests or work in progress, still, at this point.

    Please let me know if you would see anything else that should be addressed in priority, I would be glad to take a look before creating a new release.

    Thanks in advance!

  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany Anybody Porta Westfalica

    No I think one could discuss the other major ones, but better release often :)
    This is most important to fix.

  • ๐Ÿ‡ซ๐Ÿ‡ทFrance dydave

    Thanks @anybody!

    Let's see if @ressa or anyone else have anything else they would like to see addressed in priority ....

    Otherwise, I will most likely use drupalorg-cli, at the end of the day to generate the release notes and create a new release.

    Thanks again!

  • ๐Ÿ‡ฉ๐Ÿ‡ฐDenmark ressa Copenhagen

    Thanks for looking at this @anybody and @dydave. I don't have any other issues that I think need to be addressed right now, so feel free to go ahead and tag a release. And I do agree that releasing small and often is usually a good approach :)

  • ๐Ÿ‡ซ๐Ÿ‡ทFrance dydave

    Sounds good! Thanks everyone!

    Not to be included in the release, but, while I've got some attention, quick question:

    Would anybody know why the CSPELL checks are failing, see last build:
    https://git.drupalcode.org/project/admin_toolbar/-/pipelines/426926

    CSPELL job: https://git.drupalcode.org/project/admin_toolbar/-/jobs/4387582

    I thought this had been addressed in ๐Ÿ“Œ GitlabCI: Fix CSPELL validation errors Needs review and we've got the file .cspell-project-words.txt which seems to be correct in the repo:
    https://git.drupalcode.org/project/admin_toolbar/-/blob/3.x/.cspell-proj...

    I haven't looked any further than that, but would anybody be aware of any changes on the infras/CI side?
    I don't understand why the file is not picked up by the job in the build....

    It's really just a side note... We'll most likely have to create specific tickets to look into the remaining build warnings.

    But, if anyone has any idea or advice, it would be greatly appreciated.

    Otherwise: no problem for the release, it will be taken care of at the end of the day.
    Thanks everyone!

  • ๐Ÿ‡ซ๐Ÿ‡ทFrance dydave

    As requested: the new release admin_toolbar-3.5.2 โ†’ was created.

    Feel free to let us know if you encounter any issues or have any questions, we would greatly appreciated your feedback.

    Thanks again everyone for the great help!

  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany Anybody Porta Westfalica

    Thank you @dydave!! :)

  • ๐Ÿ‡ฉ๐Ÿ‡ฐDenmark ressa Copenhagen

    Awesome, thanks @dydave!

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

Production build 0.71.5 2024