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

switchlanguage treats not translated node URL as module url

    Details

      Description

      As a result, when a node is not translated in the main language of the target siteaccess, switchlanguages/to/<node_id> redirects to /<target_siteaccessname>/<node_id> even if the langage of the node is in site.ini/[RegionalSettings]/SiteLanguageList[] of the target siteaccess. The problem is located in kernel/private/classes/ezplanguageswitcher.php:133

      Steps to reproduce

      1. Install eZ Publish 4.1.3 with two languages for instance fre-FR and eng-GB
      2. Configure the fre siteaccess with eng-GB in site.ini/[RegionalSettings]/SiteLanguageList[]
      3. Configure the eng siteaccess with fre-FR in site.ini/[RegionalSettings]/SiteLanguageList[]
      4. Create an object in english only
      5. go to http://example.com/eng/swithlanguage/to/fre/<node_id>

      1. patch_swithlanguage.patch
        1 kB
        Damien Pobel
      2. prefixLanguageSwitcher.php
        3 kB
        Hubert FONGARNAND

        Activity

        Hide
        Hubert FONGARNAND added a comment -

        Why does this patch has never been integrated into the core?

        I must always use a custom LanguageSwitcherClass extension, because the default one is very buggy

        [RegionalSettings]
        LanguageSwitcherClass=prefixLanguageSwitcher

        My LanguageSwitcherClass takes care of PathPrefix and fix this problem!prefixLanguageSwitcher.php

        Show
        Hubert FONGARNAND added a comment - Why does this patch has never been integrated into the core? I must always use a custom LanguageSwitcherClass extension, because the default one is very buggy [RegionalSettings] LanguageSwitcherClass=prefixLanguageSwitcher My LanguageSwitcherClass takes care of PathPrefix and fix this problem! prefixLanguageSwitcher.php

          People

          • Assignee:
            unknown
            Reporter:
            Damien Pobel
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: