Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-17632

Wrong language used for URL alias with a non-default language node

    XMLWordPrintable

Details

    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.

      Attachments

        Activity

          People

            bd bd
            bd bd
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: