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

switchlanguage fetch not working as expected (patch)

    XMLWordPrintable

Details

    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

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: