?
avatar pulsarinformatique
pulsarinformatique
12 Jul 2015

Steps to reproduce the issue

Hi

We see a possible bug with J3.4.3 multi language features: with the SEF feature enabled the language prefix may be wrong.

For example let's say we have a french/english website. If /en/menu1 and /en/menu2 exist and if we manually enter /menu2 in the browser navigation bar (without the prefix), Joomla automatically adds /fr/ instead of /en/ so that it searches /fr/menu2 which doesn't exist!

Expected result

We would expect Joomla! adds /en/ so that it searches /en/menu2

Actual result

The current result is /fr/menu2 and a 404 error

System information (as much as possible)

Joomla 3.4.3

Additional comments

avatar pulsarinformatique pulsarinformatique - open - 12 Jul 2015
avatar infograf768
infograf768 - comment - 12 Jul 2015

Depends of the settings of the languagefilter plugin: what have you set for "Remove URL Language Code" ?
What was the last language visited as a cookie is set.
What is the default site language?

avatar pulsarinformatique
pulsarinformatique - comment - 12 Jul 2015

Hi

In the language selection plugin I left the "Remove URL Language Code" to NO so it has to be written.
The default language is FRENCH so I guess this is why joomla adds /fr/ when the prefix is not given.

I don't know how to check "What was the last language visited as a cookie is set"

thanks

cyril

avatar infograf768
infograf768 - comment - 12 Jul 2015

The default language is FRENCH so I guess this is why joomla adds /fr/ when the prefix is not given.

It could depend on the language cookie set. Your site needs the URL Language Code when something is added after the domain.
I.e. if you only use http://mysite.com, it should display the Home page corresponding to:
1. The language cookie set last time you visited —if any (it is the last language you displayed the site with)
2. The default site language OR the preferred browser language (depending on the settings in the languagefilter plugin. For Browser settings it may also depends on other factors and it may toggle down to site default language settings).

So, basically, if anything is added after the site domain like http://mysite.com/something, you DO need the URL Language code or you may get a 404.

Cyril, lets talk on skype

avatar pulsarinformatique
pulsarinformatique - comment - 12 Jul 2015

Hi

Thanks for the explanation. I understand how it works now.

According to me it still is a bug since Joomla should be able to detect and add the language prefix according to the language of the menu item.

it worked this way with J! 3.3.6

Cyril

avatar smz
smz - comment - 12 Jul 2015

it worked this way with J! 3.3.6

You sure? If this is the case we have a regression (maybe since 3.4.0)...

avatar pulsarinformatique
pulsarinformatique - comment - 12 Jul 2015

yes, I tested it
thanks

cyril

avatar smz
smz - comment - 12 Jul 2015

@pulsarinformatique Cyril, I just tested too with Joomla! 3.3.6 and 3.4.4-dev, SEF mode, do not remove default language code:

My menu:

  • English
    • Home (/en/)
    • Article (/en/article)
  • Italiano
    • Home (/it/)
    • Articolo (/it/articolo)

Results for malformed URLs

  • While in English (default language):
    • /articolo
      • 3.3.6: 404 for /en/articolo
      • 3.4.4: 404 for /en/articolo
    • /article
      • 3.3.6: redirect to /en/article
      • 3.4.4:: redirect to /en/article
  • While in Italian (non-default language)
    • /article
      • 3.3.6: 404 for /it/article
      • 3.4.4: redirect to /en/article
    • /articolo
      • 3.3.6: redirect to /it/articolo
      • 3.4.4: 404 for /en/articolo

So, there are actually some differences but I'm unsure if these can be called regressions and in both cases the behaviour seems to me to be a bit inconsistent and non-compliant (we should always have 404 for the requested malformed URL)

avatar smz
smz - comment - 12 Jul 2015

Updated results for when my PR #7271 is applied (3.4.4-smz)

  • While in English (default language):
    • /articolo
      • 3.3.6: 404 for /en/articolo
      • 3.4.4: 404 for /en/articolo
      • 3.4.4-smz: 404 for /en/articolo
    • /article
      • 3.3.6: redirect to /en/article
      • 3.4.4: redirect to /en/article
      • 3.4.4-smz: redirect to /en/article
  • While in Italian (non-default language)
    • /article
      • 3.3.6: 404 for /it/article
      • 3.4.4: redirect to /en/article
      • 3.4.4-smz: 404 for /it/article
    • /articolo
      • 3.3.6: redirect to /it/articolo
      • 3.4.4: 404 for /en/articolo
      • 3.4.4-smz: redirect to /it/articolo

With my PR, results are consistent with the 3.3.6 behavior (although still not optimal, IMHO)

@pulsarinformatique Cyril, do you have the time to test it with your environment and confirm that this is the case?

avatar brianteeman brianteeman - change - 31 Jan 2016
Status New Closed
Closed_Date 0000-00-00 00:00:00 2016-01-31 10:26:34
Closed_By brianteeman
avatar brianteeman brianteeman - close - 31 Jan 2016
avatar brianteeman
brianteeman - comment - 31 Jan 2016

After checking with @infograf768 I am closing this at this time


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/7419.

Add a Comment

Login with GitHub to post a comment