View access does not work correctly with local tasks

Created on 4 August 2025, 20 days ago

Problem/Motivation

When configuring a view with custom ECA access, the tab for the local task of that view is only shown when I'm currently visiting the path for that view. When I'm navigating to a different tab, the tab of the view with custom access is not displayed anymore.

Eg. when I'm on the URL mysite.com/node/1/myView the local tasks look like this:

when I'm on the URL mysite.com/node/1 the local tasks look like this:

Steps to reproduce

View:
- Make a view page with an url path, that is a sub-path to a content entity (eg. "node/%node/myView")
- Under "Page settings" -> "Menu" set a menu for the view with the type "Menu tab" and set a menu link title
- In the view under "Page settings" -> "Access" choose the option "ECA"
ECA:
- Created a model with the Event "Views: Access" and select the view in the plugin.
- Add the Action "Set access result" and set the access result to "allowed"
- Connect the Event and Action and save the model
Content:
- Create a content entity
- Navigate to the path of the view
---> You will see the tab of your view as a local task
- Navigate to another local task item (eg. view the content entity)
---> The local task of your view is not shown anymore

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

2.1

Component

Code

Created by

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

Comments & Activities

Production build 0.71.5 2024