Problem/Motivation
When trying to add local task to the admin toolbar, I ran into an issue that admin_toolbar_links_access_filter_filter_non_accessible_links() seems to filter out my local task because the "original_link" is not set. The original link seems to be used to retrieve the route name and route parameters.
Steps to reproduce
1) Create a menu based on a local task.
2) Log in as an authenticate user (not as admin or otherwise the menu will always be displayed)
3) See that the menu created is no displayed.
Proposed resolution
Since the route name and parameters are also available in the URL object, we could also try to retrieve them from the URL object for the item.
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | WithoutPatch.png | 43.1 KB | paulocs |
| #5 | WithPatch.jpg | 47.03 KB | paulocs |
| #2 | 3209342-2.patch | 985 bytes | seanb |
Issue fork admin_toolbar-3209342
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
seanbPatch is attached. Also create a MR.
Comment #4
paulocsPatch looks good to me. It took me a while to reproduce it but @seanB gave me the steps to reproduce.
I updated the issue summary with the steps to reproduce it.
Moving to RTBC.
Comment #5
paulocsAttaching images to confirm.
Comment #8
adriancidThanks
Comment #9
adriancid