Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 293522

Language prefix for custom menu link paths are saved but not used

$
0
0

Problem/Motivation

Menu items accept paths with a language but ignore that information when rendering. Steps to reproduce:

1. Install Drupal and have with at least two languages (say English without a path prefix and Norwegian with 'no' as prefix).
2. Create two menu items in main navigation to /node and /no/node. Both are saved.
3. Edit both, they retained what you entered.
4. Go to the front page. Both link to either /node (if page is in English) or /no/node (if page is displayed in Norwegian).

It is expected that they would consider the language entered in the path.

Proposed resolution

Validate the entered path and error if the path is going to be modified by Drupal (e.g. remove language prefix).
The workaround for linking to content in a different language must be using absolute urls.

Remaining tasks

Add a test.

User interface changes

If a url is going to be modified by Drupal on rendering, prevent it and show an error instead of ignoring it (and link to something the user does not expect).

API changes

None.

Beta phase evaluation

Reference: https://www.drupal.org/core/beta-changes
Issue categoryBug because a url is allowed on a menu but then another one is rendered.
Issue priorityMajor because ... Critical/Not critical because ...
Prioritized changesThe main goal of this issue is usability. Avoids confusion of people creating multilingual sites./td>

Viewing all articles
Browse latest Browse all 293522

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>