D11.2: update.theme_update and update.module_update no more exist

Created on 24 June 2025, 28 days ago

Problem/Motivation

After Drupal 11.2 update, I got errors when trying to edit the Administration menu (/admin/structure/menu/manage/admin):

  • Symfony\Component\Routing\Exception\RouteNotFoundException: Route "update.theme_update" does not exist.
  • Symfony\Component\Routing\Exception\RouteNotFoundException: Route "update.module_update" does not exist.

Theses errors seem to come from the /admin_toolbar/admin_toolbar_tools/src/Plugin/Derivative/ExtraLinks.php file at lines 504+ and 516+
They seem related to changes in D11.2 regarding module and theme update pages being removed.

Proposed resolution

For testing purposes, commenting these blocks of code in the aforementioned file gives back access to the Admistration menu:

@line 504:

      $links['update.module_update'] = [
        'title' => $this->t('Update'),
        'route_name' => 'update.module_update',
        'parent' => 'system.modules_list',
      ] + $base_plugin_definition;

@line 516:

      $links['update.module_update'] = [
        'title' => $this->t('Update'),
        'route_name' => 'update.module_update',
        'parent' => 'system.modules_list',
      ] + $base_plugin_definition;

Should they be removed?

πŸ› Bug report
Status

Active

Version

3.6

Component

Code

Created by

πŸ‡«πŸ‡·France PhilY πŸ‡ͺπŸ‡ΊπŸ‡«πŸ‡· Paris, France

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

Merge Requests

Comments & Activities

  • Issue created by @PhilY
  • πŸ‡«πŸ‡·France PhilY πŸ‡ͺπŸ‡ΊπŸ‡«πŸ‡· Paris, France
  • πŸ‡«πŸ‡·France PhilY πŸ‡ͺπŸ‡ΊπŸ‡«πŸ‡· Paris, France

    Patch attached for testing purposes

  • πŸ‡«πŸ‡·France PhilY πŸ‡ͺπŸ‡ΊπŸ‡«πŸ‡· Paris, France
  • Merge request !162Removed routes after Drupal 11.2 update β†’ (Merged) created by PhilY
  • πŸ‡«πŸ‡·France PhilY πŸ‡ͺπŸ‡ΊπŸ‡«πŸ‡· Paris, France

    MR committed

  • Pipeline finished with Success
    27 days ago
    Total: 219s
    #530166
  • πŸ‡©πŸ‡ͺGermany Anybody Porta Westfalica

    Thanks!

    Here's the core change record: https://www.drupal.org/node/3511861 β†’

  • πŸ‡ΊπŸ‡ΈUnited States benjifisher Boston area

    I am setting the status back to NW. See my comments on the MR.

  • πŸ‡«πŸ‡·France PhilY πŸ‡ͺπŸ‡ΊπŸ‡«πŸ‡· Paris, France

    @benjifisher: perfect thought but why checking for Drupal version? isn't verifying the route existence enough?

  • πŸ‡ΊπŸ‡ΈUnited States benjifisher Boston area

    why checking for Drupal version?

    Just for consistency. If I were writing it from the start, I would only check for whether the route exists.

  • πŸ‡«πŸ‡·France PhilY πŸ‡ͺπŸ‡ΊπŸ‡«πŸ‡· Paris, France
  • Pipeline finished with Success
    25 days ago
    #532375
  • πŸ‡©πŸ‡°Denmark uv516 Denmark

    Drupal 11.2:
    The patch helped me.

  • πŸ‡ΊπŸ‡ΈUnited States uberhacker

    More elegant patch that should also work when the routes exist?

  • πŸ‡«πŸ‡·France PhilY πŸ‡ͺπŸ‡ΊπŸ‡«πŸ‡· Paris, France

    @uberhacker: MR162 has already been upatded in this way for backward compatibility.

    When using a patch with MR, get it from here: (see attached capture).

  • πŸ‡«πŸ‡·France johnatas

    Hey,

    Patch #13 tested successfully on Drupal 11.2.2 with Admin Toolbar 3.6.1.

    Thanks,

  • πŸ‡¨πŸ‡¦Canada mediameriquat

    This is a serious issue that blocks database updates, after upgrading from Drupal 11.2.1 to 11.2.2

    The patch #3 solved both problems : I was able to update the database, and I can edit my Admin Menu. Thanks!

  • πŸ‡«πŸ‡·France johnatas

    Hi @mediameriquat,

    I believe the issue you're describing is the one that was reported in the thread of MR !162.
    Patch #13 includes a conditional that should address it.

    On my side, I created a patch based on MR !162 that works as expected β€” I'm attaching it to this comment.

  • First commit to issue fork.
  • πŸ‡«πŸ‡·France dydave

    Thanks a lot everyone for reporting this issue and all the great help working on the code changes and tests.

    Sorry for the late reply... But it's been a rough couple of weeks work-wise πŸ˜…

    The changes from the merge request seem very reasonable and accurate to fix this bug.

    I have just added a commit to refactor a bit the calls to version compare.
    I have tested the changes locally on a D11.2 and a D10.5 sites and they seemed to work as expected πŸ‘Œ

    I would greatly appreciate if you could please help testing and reviewing the merge request.

    We don't currently have tests for this part of the module, so once we're good with these changes, we should be able to get them merged πŸ‘

    Any comments, reviews or testing feedback would be greatly appreciated.
    Thanks in advance !

  • πŸ‡«πŸ‡·France dydave
  • πŸ‡«πŸ‡·France dydave

    Not sure why though .... But I'm not seeing the update.module_install and update.theme_install links on D10.5...

    I wanted to check whether my last refactoring commit changed the display order of the menu items, but I was unable to find the links Install new module or Install new theme added by the admin_toolbar module....

    Would anyone have any feedback on that ?

    Otherwise, I'll take a bit more time later to look into this.

    Thanks in advance!

  • πŸ‡«πŸ‡·France dydave

    OK, so I've checked these with a colleague and it would seem the install routes were dropped in D10.4 according to the change record The feature to install a new extension from a URL via the Drupal UI has been removed β†’ .

    I understand better now, why I could not find the routes when testing with D10.4, D10.5 and D11.

    So we should also probably update this compared version in the merge request as well.

    I'll do a bit more tests to see if my latest commit changed the order of display of the links.

  • πŸ‡«πŸ‡·France dydave

    OK, I've tested this with D10.3.14 and the routes seem to be displaying in the same order before and after patch βœ…
    See screenshot below:

    Upgraded to 10.4.8 and the install routes disappeared βœ…

    I didn't get any crash on the Edit admin menu page, since the existence of the routes is checked as well.

    Therefore, I added an additional commit to update the version comparison for the install routes for 10.4, corresponding to change record The feature to install a new extension from a URL via the Drupal UI has been removed β†’ .

    I've tested the changes locally myself with D10.3, D10.4, D11.2.2 and they seemed to work as expected πŸ‘Œ

    At this point, the merge request should be pretty much ready to get merged, but let's get some more testing feedback and reviews, if possible, before effectively merging it.
    Thanks in advance!

  • πŸ‡«πŸ‡·France johnatas

    Hi @dydave,
    The latest version of the MR works as expected on my D11.2.2 project ❀️
    Thanks for the work!

  • πŸ‡«πŸ‡·France dydave

    Thanks a lot Sylvain (@johnatas) for the prompt and positive feedback, it's greatly appreciated! πŸ™

    Following your confirmation, I did a few more manual tests locally and since all the jobs and automated tests for the merge request were passing 🟒 , I went ahead and merged the changes above at #25 πŸ› D11.2: update.theme_update and update.module_update no more exist Active πŸ₯³
    Great job everyone! πŸ‘

    As a follow-up to this issue, I created feature request ✨ Provide extra links for the Automatic Updates module Active as an attempt to provide an "equivalent" to these extra links, which should most likely be supported by the Automatic Updates β†’ contrib module from now on.

    At this point, since I don't see anything else outstanding, this issue could probably be considered as Fixed for now.

    Feel free to let us know if we missed anything or if you would encounter any issues with any of the latest code changes, we would surely be glad to hear your feedback.
    Thanks again everyone for the great work and help on this issue! πŸ™‚

  • πŸ‡«πŸ‡·France dydave

    Crediting my colleague @tYb for his help fixing the version compare for the install routes.

Production build 0.71.5 2024