? Success

User tests: Successful: Unsuccessful:

avatar infograf768
infograf768
13 Jul 2015

See: #7417 (comment) and #7394

The problem was that the lang cookie was never checked when sef was off.

To test:
Create a simple multilanguage site with 3 languages. Make sure the default site language and the browser preferred language are different.
Set SEF to off in Global Configuration.
Display any site page which is not using the default site language or the browser preferred language.
Let's call it lang3

Open a new window in the same browser and enter the pure domain url, i.e. of the type http://mysite.com

Before patch, you will be redirected to the default site language or to the preferred browser language (depending on the language filter settings).
After patch, it will display lang3 language home page and the protostar logo link will too.

avatar infograf768 infograf768 - open - 13 Jul 2015
avatar infograf768 infograf768 - change - 13 Jul 2015
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 13 Jul 2015
Labels Added: ?
avatar infograf768 infograf768 - change - 13 Jul 2015
Priority Medium Urgent
Easy No Yes
avatar infograf768 infograf768 - change - 13 Jul 2015
Category Multilanguage
avatar Bakual
Bakual - comment - 13 Jul 2015

May this be related? #6452 (comment)
Apparently the cookie isn't read when "Remove URL Language Code" is disabled (when enabled it works fine).

avatar infograf768
infograf768 - comment - 13 Jul 2015

This PR does not concern the Remove URL Language Code parameter as this is only used when sef is on.

I have no issue here with Remove URL Language Code generally speaking.

avatar Bakual
Bakual - comment - 13 Jul 2015

Does the cookie work for you when you have the "Remove URL Language Code" parameter disabled? The cookie only works for me when I have it enabled, and the code looks like it indeed only gets checked then.
So that issue is not only when SEF is off, but always when the "Remove URL Language Code" is disabled (which happens to be disabled with SEF off anyway).

avatar infograf768
infograf768 - comment - 13 Jul 2015

Checking now

avatar infograf768
infograf768 - comment - 13 Jul 2015

Confirmed....

avatar Bakual
Bakual - comment - 13 Jul 2015

At least I'm not crazy then :)

avatar infograf768
infograf768 - comment - 13 Jul 2015

Who said so? :smile:

avatar Bakual
Bakual - comment - 13 Jul 2015

I started thinking that :)

avatar infograf768
infograf768 - comment - 13 Jul 2015

@Bakual
I have now added the necessary code to also check for the cookie when URL Language Code is always present. Please test.

@smz

Please test also

avatar infograf768 infograf768 - change - 13 Jul 2015
Title
Regression: Multilanguage: cookie is not checked when sef is off
Regression: Multilanguage: cookie is not checked when sef is off and when sef is on and URL Language Code always present
avatar infograf768 infograf768 - change - 13 Jul 2015
Title
Regression: Multilanguage: cookie is not checked when sef is off
Regression: Multilanguage: cookie is not checked when sef is off and when sef is on and URL Language Code always present
avatar Bakual Bakual - test_item - 14 Jul 2015 - Tested successfully
avatar Bakual
Bakual - comment - 14 Jul 2015

Tested successfully with SEF enabled and disabled and with "Remove URL Language Code" enabled and disabled. All worked as expected.
Also code review is fine.

avatar imanickam
imanickam - comment - 14 Jul 2015

Tested the files in a multilingual site that has three languages and two articles for each language. The articles and the menu items are associated.

Observed the following:

Settings:
Global Configuration/Search Engine Friendly URLs: Yes
Global Configuration/Use URL Rewriting: No
Language Filter/Remove URL Language Code: Yes
Default Site Language: en-GB

Observation: In the home page of the default language, the index.php is not shown in the URL (of the address bar) when the domain name is typed in the address bar. In other pages of the default language, index.php is shown. Whereas in non default languages, index.php is shown in the urls.

On the other hand, if you click on the menu item Home, the index.php is shown in the URL of the address bar. Again, when the logo is clicked, the index.php will not show.

In all other settings, the URL seen in the address bar of the browser is consistent with what is expected to be seen.

avatar infograf768
infograf768 - comment - 15 Jul 2015

@imanickam
In fact your observation is also true before this patch.
URL Language Code removed, sef on, sef_rewrite off
When entering the pure domain, the index.php is not added when using the default site language
(To test, set Language for new visitors to Site language)
We have to switch to another menu item and then click again on home menu item to get it.
Will try to solve this but it is unrelated to this PR.

avatar infograf768
infograf768 - comment - 15 Jul 2015

Looking further: we have the same behaviour on a monolanguage site...
mysite.com and mysite.com/index.php would both load the home page

avatar infograf768
infograf768 - comment - 15 Jul 2015

http://localhost:8888/trunkgitnew/index.php/single-article.html
and
http://localhost:8888/trunkgitnew/single-article.html

would also load the same page.

My conclusion, if you agree, is that this PR is not at stake and can go RTC.

avatar Bakual
Bakual - comment - 16 Jul 2015

The index.php isn't needed for the homepage if no other parameters are in the URL. So that is expected.

http://localhost:8888/trunkgitnew/index.php/single-article.html
and
http://localhost:8888/trunkgitnew/single-article.html

That only works because you still have mod_rewite activated in the .htaccess.

So it is working as intended. Setting to RTC.

avatar Bakual Bakual - change - 16 Jul 2015
Labels Added: ?
avatar Bakual Bakual - change - 16 Jul 2015
Milestone Added:
avatar zero-24 zero-24 - alter_testresult - 16 Jul 2015 - imanickam: Tested successfully
avatar zero-24 zero-24 - change - 16 Jul 2015
Status Pending Ready to Commit
avatar zero-24
zero-24 - comment - 16 Jul 2015

Moving the Tracker also to RTC :birthday:


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

avatar infograf768
infograf768 - comment - 17 Jul 2015

That only works because you still have mod_rewite activated in the .htaccess.

Correct, although sef_rewrite was off, I had left the .htaccess file. :)

avatar zero-24 zero-24 - close - 19 Jul 2015
avatar wilsonge wilsonge - change - 19 Jul 2015
Status Ready to Commit Closed
Closed_Date 0000-00-00 00:00:00 2015-07-19 16:16:41
Closed_By wilsonge
avatar wilsonge wilsonge - close - 19 Jul 2015
avatar zero-24 zero-24 - change - 14 Oct 2015
Labels Removed: ?

Add a Comment

Login with GitHub to post a comment