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

Error in UrlAliasService:matchLanguageCode() with same path string in differents languages

    XMLWordPrintable

Details

    Description

      The UrlAliasService:matchLanguageCode() doesn't works well with translations. (eZ/Publish/Core/Repository/URLAliasService.php
      L.396)
      In foreach(), the languages are not ordered according to current siteaccess.
      So, it returns the first match which isn't necessary in the current siteaccess's language.

      Example :

      • You have a article named "Media" with 2 translations, fre-FR, the main, and eng-GB
      • The word "Media" is the same in french and english
      • In the english siteaccess, from any page, you click on a link to the "Media" page
      • In the matchLanguageCode(), fre-FR comes first and $pathElement match with $translation, so fre-FR is returned as the current language code, when in reality it's eng-GB

      Attachments

        Activity

          People

            Unassigned Unassigned
            lymathon lymathon
            Votes:
            0 Vote for this issue
            Watchers:
            13 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 week, 3 hours, 35 minutes
                1w 3h 35m