If entity canonical path is overridden with a view with optional arguments, content translation's routes will result in fatal errors

Created on 20 August 2014, over 10 years ago
Updated 16 August 2023, over 1 year ago

Problem/Motivation

The taxonomy page is now a view, so visiting /taxonomy/term/X will use a view to display the list. This view may be modified to use optional arguments as it was before #1857256: Convert the taxonomy listing and feed at /taxonomy/term/%term to Views β†’ where the view used a term_node_tid_depth argument instead of a single tid argument. That modifies the path under the route. However content translation is not ready to fill in route parameters other than the default entity identifier expected, so such modifications in the path under the route result in fatal errors from content translation:

Symfony\Component\Routing\Exception\InvalidParameterException: Parameter "arg_1" for route "/taxonomy/term/{taxonomy_term}/{arg_1}/translations" must match "[^/]++" ("" given) to generate a corresponding URL. in Symfony\Component\Routing\Generator\UrlGenerator->doGenerate() (line 167 of core/vendor/symfony/routing/Symfony/Component/Routing/Generator/UrlGenerator.php).

Proposed resolution

We should inherit route parameters in the content translation routes from the canonical route for this use case.

Remaining tasks

Devise fix
Write tests
Reviews

User interface changes

None.

API changes

None.

πŸ› Bug report
Status

Closed: outdated

Version

9.5

Component
Content translationΒ  β†’

Last updated about 17 hours ago

No maintainer
Created by

πŸ‡ΊπŸ‡ΈUnited States jhodgdon Spokane, WA, USA

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

    Related to the Views in Drupal Core initiative.

  • D8MI

    (Drupal 8 Multilingual Initiative) is the tag used by the multilingual initiative to mark core issues (and some contributed module issues). For versions other than Drupal 8, use the i18n (Internationalization) tag on issues which involve or affect multilingual / multinational support. That is preferred over Translation.

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.

  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Since there hasn't been a follow up to #29 going to close out for now.

    If still a bug for D10+ please reopen updating issue summary with steps to reproduce

    Thanks all!

Production build 0.71.5 2024