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

If you don't want to translate your URL alias, the original URL alias won't work with your translations

$
0
0

Problem/Motivation

If you don't want to translate your URL alias, the original URL alias won't work with your translations.

Steps to reproduce:

  1. Install with standard
  2. Enable language and content translation.
  3. Add a language (e.g. Spanish)
  4. Go to content translation settings and enable article translations. Uncheck the URL alias field.
  5. Create a node, assign an URL alias in the form (e.g. /my-alias)
  6. Translate the node. The URL alias is prepopulated with your source alias (e.g. /my-alias).
  7. Submit the form.

Current outcome:
In the alias list, you have (/my-alias, EN).
Going to /es/my-alias gives a 404.

Expected outcome:
In the alias list, you should have (/my-alias, UND).
Going to /es/my-alias gives a 200 and displays the Spanish translation.

Proposed resolution

  • If the entity OR the path field are not translatable, save the path alias with the langcode 'und'.
  • If the entity AND the path field are translatable, save the path alias with the langcode of the entity (or translation).

Remaining tasks

  • Agree on proposed resolution
  • Review

User interface changes

None.

API changes

None.

Data model changes

None.


Viewing all articles
Browse latest Browse all 292486

Trending Articles



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