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

language switcher : UrlAliasGenerator generate wrong url when there is no translation

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: High High
    • None
    • 5.3.3, 2014.11, 5.4.2
    • Language, Platform stack

    Description

      In a site with 2 translations (2 siteaccess with different language), I have a language switcher implemented as explained in https://doc.ez.no/display/EZP/Language+Switcher.

      If I am on an article in french that has no english translation and I switch to english siteaccess the urlAlias generated will be wrong : mysite.com/eng/fre/content/location/63

      If we look into https://github.com/ezsystems/ezpublish-kernel/blob/master/eZ/Publish/Core/MVC/Symfony/Routing/Generator/UrlAliasGenerator.php#L74 we see that if there is not translation for the current location if will fallback to the default router. But the default router will generate an url of type fre/content/location/63 and because we ask for a siteaccess change it will result in mysite.com/eng/fre/content/location/63

      Shouldn't this redirect to root location if there is no translation ?

      Attachments

        Activity

          People

            Unassigned Unassigned
            1f3baf94-5904-4b87-8341-a99f2d4328d8@accounts.ibexa.co Matthieu Sévère
            Votes:
            1 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 35 minutes
                35m