View access does not work correctly with local tasks
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3539589. --> Reported by: [tkasecker](https://www.drupal.org/user/3850530) >>> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>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.</p> <p>Eg. when I'm on the URL <em>mysite.com/node/1/myView</em> the local tasks look like this:<br> <img src="https://www.drupal.org/files/issues/2025-08-04/local_tasks_with_custom_access_view.png" alt="local tasks show tab with custom access"><br> when I'm on the URL <em>mysite.com/node/1</em> the local tasks look like this:<br> <img src="https://www.drupal.org/files/issues/2025-08-04/local_tasks_without_custom_access_view.png" alt="local tasks don't show tab with custom access"></p> <h4 id="summary-steps-reproduce">Steps to reproduce</h4> <p>View:<br> - Make a view page with an url path, that is a sub-path to a content entity (eg. "node/%node/myView")<br> - Under "Page settings" -&gt; "Menu" set a menu for the view with the type "Menu tab" and set a menu link title<br> - In the view under "Page settings" -&gt; "Access" choose the option "ECA"<br> ECA:<br> - Created a model with the Event "Views: Access" and select the view in the plugin.<br> - Add the Action "Set access result" and set the access result to "allowed"<br> - Connect the Event and Action and save the model<br> Content:<br> - Create a content entity<br> - Navigate to the path of the view<br> ---&gt; You will see the tab of your view as a local task<br> - Navigate to another local task item (eg. view the content entity)<br> ---&gt; The local task of your view is not shown anymore</p> <h3 id="summary-proposed-resolution">Proposed resolution</h3> <h3 id="summary-remaining-tasks">Remaining tasks</h3> <h3 id="summary-ui-changes">User interface changes</h3> <h3 id="summary-api-changes">API changes</h3> <h3 id="summary-data-model-changes">Data model changes</h3>
issue