Trigger a menu link rebuild for user roles and views entity operations

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 this bug was identified when testing the Admin Toolbar Tools module.

Creating, deleting or updating a user role or a view does not get reflected immediately in the Admin Toolbar's extra links.

Steps to reproduce

[Insert]
User roles:
1 - Enable the Admin Toolbar Tools module.
2 - Add a user role at admin/people/roles/add
3 - Confirm the added role does not display in the menu links.

Views:
1 - Enable the Admin Toolbar Tools and Views modules.
2 - Add a view at admin/structure/views/add
3 - Confirm the added view does not display in the menu links.

[Delete]
Repeat the same steps with deleting a user role and a view and confirm the corresponding link still appears in menu links.

[Update]
Repeat the same steps with updating a user role and a view name/label and confirm the corresponding role and view still appear with the label before it was updated.

Proposed resolution

Add the 'user_role' and 'view' entity types to the ones currently triggering a menu link rebuild on entity operations, see:
https://git.drupalcode.org/project/admin_toolbar/-/blob/3.6.2/admin_tool...

This is already the case for the 'menu' config entity type: Whatever operation is carried on menus (create, delete or update), the changes will always immediately be reflected in the Admin Toolbar's extra menu links.
 

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!

🐛 Bug report
Status

Needs review

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