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:
- Install with standard
- Enable Language and Content Translation modules.
- Add a language (e.g. Spanish)
- /admin/config/regional/language
- Edit Article content type, Language settings > Enable translation
- /admin/structure/types/manage/article
- Go to content translation settings and check Content. Within Article, uncheck the URL alias field.
- /admin/config/regional/content-language
- Create an Article, assign an URL alias in the form (e.g. /my-alias)
- Translate the node. The URL alias is prepopulated with your source alias (e.g. /my-alias).
- Submit the form.
Current outcome:
In the alias list (/admin/config/search/path), 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.