Problem/Motivation
At the moment the list of the top level menu items in the content menu on admin/structure/menu/manage/content is inconsistent with list of local tasks on /admin/content.
admin/structure/menu/manage/content
- blocks
- content
- files
- media
/admin/content
- content
- blocks
- comments
- files
- media
The two differ in order and number. the content menu starts with blocks and then gets to content, while the local tasks start the other way around with content and then get to blocks. while a menu item for comments is unavailable in content menu. That way the user has a sort of unpredictable mismatch between the two, the cognitive load is high and things are potentially confusing.
Steps to reproduce
- Open
/admin/contentin one window - Open
admin/structure/menu/manage/contentin a second window - Now compare the order of menu items in the content menu with the local tasks on
/admin/content.
Proposed resolution
Keep the list of top level menu items on the content menu page admin/structure/menu/manage/content (except the create top level item) in sync with the list of local tasks on /admin/content and add tests to future proof that synchronosity as suggested in #9
In https://drupal.slack.com/archives/C7AB68LJV/p1708968993206769 @joachim suggested a dynamic generation instead of hardcoding - the related issue for admin_toolbar he provided was #3028213: generalize creation of 'add ENTITY' and 'add BUNDLE' links
In case it turns out that endeavor is impossible make at least sure that the standard and umami profiles should provide users with a starting point where the two lists are identical in order and number of menu items.)
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | 3427660-5-d11.2-content-links-fixed-weight.patch | 750 bytes | casey |
Comments
Comment #2
rkollerComment #3
ckrinaComment #4
aaronmchaleAs part of this, could we also add a test which ensures that the local tasks on /admin/content and the content menu are always consistent?
For instance, if a future issue adds a new local task to /admin/content, the test should fail if the same tab is not a link in the content menu and is not in the same position.
Comment #5
casey commentedNot sure how to resolve this issue properly.
For now, here's a patch that adds a default weight to content and files, so they are ordered first and last respectively. Links like media will display in between alphabetically.
Comment #7
rkollerUsability review
We discussed this issue at #3574712: Drupal Usability Meeting 2026-02-27. The link to the recording: https://www.youtube.com/watch?v=B7ESB2dVsT0. The attendees at the usability meeting were @benjifisher, @pallavi singh3013, @rkoller, @simohell.
The group had a clear consensus that it is potentially challenging to the user if the list of menu items for the content menu differs in number and order from the list of local tasks on
/admin/content. It was clear this isn't a flaw in the navigation block menu since it is getting the order of menu items correctly from the content menu onadmin/structure/menu/manage/content. You are able to change the order or add and remove menu items from the content menu and the content navigation block is updating its top level menu items accordingly. So it looks like the there is one menu system on the content menu the admin is able to control the order and the number of top level menu items and one menu system for the local tasks onadmin/codethe user is unable to control (which most likely comes from code). But those two systems should ideally be kept in sync so you have two consistent lists in order and number - that raises the question, which of the two menu systems should be the source of truth?Cuz there are two scenarios that illustrate the disconnect down the road. If you are installing the https://www.drupal.org/project/storage it is adding a local task to
/admin/contentbut it is not adding a top level menu item ontoadmin/structure/menu/manage/content. (*I've opened #3576365: The Storage data page is unavailable for the content navigation block in the navigation module after the meeting , but I am uncertain if that should be handled by contrib modules and not better by core itself - that is my personal opinion and was not part of the meeting). The other way around it is the same. If someone for whatever reason adds a top level menu item to the content menu no corresponding local task is getting added to the content page.Even though the synchronosity between the two lists should be the ideal goal we concluded it "might" be impossible to enforce and accomplish that consistency all the time. but at the very least the standard and umami profiles should provide users with a starting point where the two lists are identical in order and number of menu items.
P.s. I've updated the issue summary aligning it with the outcomes of the meeting, i've then updated the examples and removed the example for RTL because i was unable to reproduce the additional disconnect between LTR and RTL i'Ve noticed previously. and finally i'Ve also added aarons point to the proposed resolution about adding tests.