5

How can create menu views tabs of node? In Drupal 7 i can create views like this:

Setting views

Setting menu

when i visit node/1/teaser it's show good.

Node view

But with same setting in drupal 8.

Drupal 8 Setting

when i visit node/1 show error:

Symfony\Component\Routing\Exception\MissingMandatoryParametersException: Some mandatory parameters are missing ("arg_0") to generate a URL for route "view.menu_tabs.page_1". in Drupal\Core\Routing\UrlGenerator->doGenerate() (line 171 of core/lib/Drupal/Core/Routing/UrlGenerator.php).

and node/1/teaser show error:

Symfony\Component\Routing\Exception\MissingMandatoryParametersException: Some mandatory parameters are missing ("node") to generate a URL for route "entity.node.devel_load". in Drupal\Core\Routing\UrlGenerator->doGenerate() (line 171 of core/lib/Drupal/Core/Routing/UrlGenerator.php).

6

This is a known issue in views.

The issue is that the route parameter for entities needs to be named:

This view will be displayed by visiting this path on your site. You may use "%" or named route parameters like "%node" in your URL to represent values that will be used for contextual filters: For example, "node/%node/feed" or "view_path/%". The named route parameters are necessary when used within paths used by entities such as "taxonomy/term/%taxonomy_term" or "user/%user/custom-view

This is for the first error message.

The second one is caused by the devel module. If you still get this error after renaming the route parameter, you have to check the issue queue from this module.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.