:warning: _WARNING: URLAlias Pull request detected, extra reviews and testing needed! ping :hand:
Ezp 23753 node alias translation
When a node that exists on a language different from the siteaccess default language, but has a translated parent/path, the UrlAlias will be incorrect.
For example, for a "FreFolder/EnArticle" the returned alias in fre siteaccess is "EnFolder/EnArticle".
Besides incorrect, this causes additional problems when there is a
PathPrefix setting for that SA.
This happens because
eZContentObjectTreeNode requests the alias in the current node's language:
eZURLAliasML::fetchPathByActionList( "eznode", $pathArray, $this->CurrentLanguage );
The fix from EZP-20494 (PR #572) resolved this by prefering the wanted language ONLY for the last node, and returning the rest of the path according to the prioritized languages, however it introduced a change in behavior as well.
This PR resolves the problem by reverting 20494 (if applicable), and having the node fetch the alias full path using solely the prioritized language list.
- 点赞 评论 复制链接分享
WTF :) ?点赞 评论 复制链接分享
You're drunk , go home ;-)点赞 评论 复制链接分享
:P ;)点赞 评论 复制链接分享
Updated PR, added regression test. The logic was modified a bit, essentially nodes's
CurrentLanguageis only set when the node was fetched on a specific language (and the actual translation matches).
This means that fetching f.e. from templates as described in EZP-17632 will still return the alias in that language, but fetching with default will always respect prioritized languages.点赞 评论 复制链接分享
+1点赞 评论 复制链接分享
gentle ping :)点赞 评论 复制链接分享
going 's style on this one : +0,5点赞 评论 复制链接分享
Nitpicking aside: +1.点赞 评论 复制链接分享
With BD's nitpicking, +0,5 :)点赞 评论 复制链接分享
ping , you can merge it点赞 评论 复制链接分享