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

Use main translation for URI when no prioritized translation exists (patch)

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Medium Medium
    • Resolution: Obsolete
    • Affects Version/s: 2011.7
    • Fix Version/s: Customer request
    • Component/s: Language
    • Labels:
      None
    • Environment:

      eZ Publish 4.3

      Description

      Feature request:
      When no prioritized translation exists for a given object in a given site access, but it has several unprioritized translations, the main translation should be used for the URI. (Currently it is arbitrary which translation is used in this edge case.)

      Prioritized translation: Translation to a locale which is listed in site.ini [RegionalSettings] SiteLanguageList[]

      Steps to reproduce
      • Set site.ini [RegionalSettings] SiteLanguageList[] to language A.
      • Create object in languages B and C.
      • View the object, check the URI language. It can be either B or C, depending on login, location, perhaps order of entry, or other unknown circumstances.

        Activity

        Hide
        (inactive) Gunnstein Lye added a comment -

        I have made a patch that implements the feature request, see attachment. It works in my tests. It's not optimal, since it adds some node/object queries for every path generated. It would probably perform better if a main/initial language field was added to the ezurlalias_ml table, but I'm not sure if it's significant. You'll need to clear template block and content caches to see the change.ezurlaliasml.php-prefer-initial-language-4.3.diff

        Show
        (inactive) Gunnstein Lye added a comment - I have made a patch that implements the feature request, see attachment. It works in my tests. It's not optimal, since it adds some node/object queries for every path generated. It would probably perform better if a main/initial language field was added to the ezurlalias_ml table, but I'm not sure if it's significant. You'll need to clear template block and content caches to see the change. ezurlaliasml.php-prefer-initial-language-4.3.diff
        Hide
        (inactive) Gunnstein Lye added a comment -
        Show
        (inactive) Gunnstein Lye added a comment - ezurlaliasml.php-prefer-initial-language-4.3.diff First attempt at patch
        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:
            unknown
            Reporter:
            (inactive) Gunnstein Lye
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: