Add 'Manage Permissions' and standardize menu label in Admin Toolbar Search suggestions

Created on 14 October 2025, 18 days ago

Problem/Motivation

This issue is a follow-up to 📌 Automated Tests: Add Functional tests for classes ExtraLinks and SearchLinks Needs review where the 'Manage Permissions' was found missing and non standard menu labels in Admin Toolbar Search suggestions.

The 'Manage Permissions' link is added properly to menu links in the toolbar with ExtraLinks, but not in the SearchLinks which are displaying extra links that are not displayed in the HTML of the page, see:

The label for Menus Search links does not currently follow the same standard as other entity types, see how the screenshot above compares with the screenshot below:

The current label: Menus > Shulewuj
Should be: Menu > Shulewuj > Edit

Steps to reproduce

1 - Install the Admin Toolbar Tools and the Admin Toolbar Search modules.
2 - Login with an Administrator user to be able to see the 'Manage Permissions' link.
3 - Configure the max bundle number to 2 on the settings form page (admin/config/user-interface/admin-toolbar-tools)
4 - Add a test content type so that there are at least 3 content types.
5 - Flush the caches.
6 - Search in the Admin Toolbar Search for the content type created at 4 by typing in the label.
7 - Confirm the 'Manage Permissions' suggestion is missing from the search results.
8 - Search in the Admin Toolbar Search for the 'Main navigation' menu by typing in 'navigation'.
9 - Confirm the displayed suggestions labels do not match other search links standards.

Proposed resolution

Modify the class 'SearchLinks' to fix these issues:

1 - Add the 'Manage Permissions' entity bundle link to the search suggestions, based on the existing code used to add other search links, see for example:
https://git.drupalcode.org/project/admin_toolbar/-/blob/3.6.2/admin_tool...

2 - Refactor the code for the 'menu' entity search links labels, based on the code used for other entities (content types, for example), see $label_base:
https://git.drupalcode.org/project/admin_toolbar/-/blob/3.6.2/admin_tool...
 

Feel free to let us know if you have any questions or concerns on any aspects of this issue or the project in general, we would surely be glad to hear your feedback.
Thanks in advance!

📌 Task
Status

Active

Version

3.0

Component

Code

Created by

🇫🇷France dydave

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

No activities found.

Production build 0.71.5 2024