Details
-
Bug
-
Resolution: Fixed
-
Medium
-
4.2.0, 4.3.0, 4.4.0alpha3
-
None
Description
The template fetch function 'switchlanguage' only switches the last element of the url alias. Any parent nodes are translated according to [RegionalSettings].SiteLanguageList rather than the specified language.
The attached patch against git master solves the problem, by ensuring that the specified language is always the first in the prioritised list.
Tested successfully against the following unit tests:
- eZURLAliasMlTest *
- eZURLAliasMlRegression *
- eZContentObjectTreeNodeTest::testFetchAliasesFromNodeList
Steps to reproduce
- Create a folder in English and Norwegian
- Within it, create an article in English and Norwegian
- Go to a site access where English is the most prioritised language
- Run the 'switchlanguage' template fetch function on the article, fetching the Norwegian url alias
- BUG: The resulting url alias is: "english_folder_name/norwegian_article_name"
Attachments
Issue Links
- relates to
-
EZP-14805 Language switcher would leave out parts of an URL which was not translated in the destination locale.
- Closed