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

switchlanguage fetch not working as expected (patch)

    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"
      1. ezurlaliasml.php-locale_first-master.diff
        1 kB
        (inactive) Gunnstein Lye
      2. ezurlaliasml.php-locale_first-v2-master.diff
        1 kB
        (inactive) Gunnstein Lye

        Issue Links

          Activity

          Hide
          (inactive) Gunnstein Lye added a comment -

          ezurlaliasml.php-locale_first-v2-master.diff Improved patch, cleaner implementation

          Show
          (inactive) Gunnstein Lye added a comment - ezurlaliasml.php-locale_first-v2-master.diff Improved patch, cleaner implementation
          Show
          (inactive) Gunnstein Lye added a comment - - edited Fixed in master (4.4.0 alpha6) http://github.com/ezsystems/ezpublish/commit/46ab9b08d654fef288ce2fb2cd8fc0d11a391da2 stable-4.3 (4.3.1) http://github.com/ezsystems/ezpublish/commit/bc77cf29322c07abb78f015260d518b4b8204608 stable-4.2 (4.2.1) http://github.com/ezsystems/ezpublish/commit/46d554cc8243164b4cab09e981492a836985a37b
          Hide
          ezrobot added a comment -

          This issue has been automatically closed due to the lack of activity over a long period of time. It is very likely that it is obsolete, but if you think it is still valid, do not hesitate to reopen it and mention why.

          Show
          ezrobot added a comment - This issue has been automatically closed due to the lack of activity over a long period of time. It is very likely that it is obsolete, but if you think it is still valid, do not hesitate to reopen it and mention why.

            People

            • Assignee:
              (inactive) Gunnstein Lye
              Reporter:
              (inactive) Gunnstein Lye
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: