Views path with menu tab does not validate and results in fatal error

Created on 16 May 2015, over 9 years ago
Updated 6 October 2023, about 1 year ago

Problem/Motivation

The Views UI tells you that you can enter a path in the form of node/%/feeds, but doing so while adding a menu tab results in a Fatal error.

Twig_Error_Runtime: An exception has been thrown during the rendering of a template ("Some mandatory parameters are missing ("arg_0") to generate a URL for route "view.articles_per_page.page_1".") in "core/themes/classy/templates/navigation/menu-local-task.html.twig" at line 17. in Twig_Template->displayWithErrorHandling() (line 328 of core/vendor/twig/twig/lib/Twig/Template.php). 

It works as expected when making the path node/%node/feeds.
The view is accessible in both cases, only the node page that should render the tab blows up.

To reproduce:

  1. Install the standard profile.
  2. Add a content entity reference field to articles and allow pages.
  3. Add a view with a page
    • set the path to node/%/articles
    • set the menu to "menu tab"
    • add a contextual filter with the field added in step 2.
    • add a validation filter: content page bundle
  4. Visit a page content and find a fatal Error

Proposed resolution

fix the bug!

Remaining tasks

User interface changes

no

API changes

probably not..

Beta phase evaluation

<!--Uncomment the relevant rows for the issue. -->
🐛 Bug report
Status

Needs work

Version

9.5

Component
Views 

Last updated about 18 hours ago

Created by

🇨🇭Switzerland bircher 🇨🇿

Live updates comments and jobs are added and updated live.
  • Documentation

    Primarily changes documentation, not code. For Drupal core issues, select the Documentation component instead of using this tag. In general, component selection is preferred over tag selection.

  • VDC

    Related to the Views in Drupal Core initiative.

  • Triaged core major

    There is consensus among core maintainers that this is a major issue. Only core committers should add this tag.

  • Needs reroll

    The patch will have to be re-rolled with new suggestions/changes described in the comments in the issue.

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.

Production build 0.71.5 2024