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

CommentFileSizeAuthor
#5 WithoutPatch.png43.1 KBpaulocs
#5 WithPatch.jpg47.03 KBpaulocs
#2 3209342-2.patch985 bytesseanb
Command icon 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

seanB created an issue. See original summary.

seanb’s picture

StatusFileSize
new985 bytes

Patch is attached. Also create a MR.

paulocs’s picture

Issue summary: View changes
Status: Active » Reviewed & tested by the community

Patch 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.

paulocs’s picture

StatusFileSize
new47.03 KB
new43.1 KB

Attaching images to confirm.

adriancid made their first commit to this issue’s fork.

  • adriancid committed b8442d2 on 3.x
    Issue #3209342: Links without "original_link" are filtered by...
adriancid’s picture

Thanks

adriancid’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.