Details
-
Bug
-
Resolution: Fixed
-
High
-
4.3.0, 4.4.0
-
None
Description
When fetching a node with a forced language from a template:
{def $nodecible=fetch('content', 'node', hash('node_id', $node.node_id, 'language_code', $languesite))} {$nodecible.name}<br />{$nodecible.url_alias}<br />
The wrong language will be used when requesting the URL alias.
Steps to reproduce
Steps to reproduce:
1). add following template code to a template (e.g. choose extension/ezwebin/design/ezwebin/override/templates/full/folder.tpl)
<div style="border: 5px red double; background-color: white"> <h1>{$node.name}</h1> {def $locale = ezini('RegionalSettings', 'Locale', 'site.ini')} {def $listelocale = ezini('RegionalSettings', 'SiteLanguageList', 'site.ini')} {foreach $listelocale as $languesite} <h2>{$languesite}</h2> {def $nodecible=fetch('content', 'node', hash('node_id', $node.node_id, 'language_code', $languesite))} {$nodecible.name}<br />{$nodecible.url_alias}<br /> {$nodecible|attribute(show, 2)} <hr> {/foreach} </div>
2). Create an object that is translated to two languages existing in the system
3). Please notice that url_alias for both translations is always the same and depends on the current siteaccess language e.g. for Norwegian siteaccess it will always give "mappe" instead of "folder" for English translation.