User tests: Successful: Unsuccessful:
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.
Status | New | ⇒ | Pending |
Labels |
Added:
?
|
Priority | Medium | ⇒ | Urgent |
Easy | No | ⇒ | Yes |
Category | ⇒ | Multilanguage |
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.
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).
Checking now
Confirmed....
At least I'm not crazy then :)
Who said so?
I started thinking that :)
Title |
|
Title |
|
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.
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.
@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.
Looking further: we have the same behaviour on a monolanguage site...
mysite.com and mysite.com/index.php would both load the home page
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.
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.
Labels |
Added:
?
|
Milestone |
Added: |
Status | Pending | ⇒ | Ready to Commit |
Moving the Tracker also to RTC
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. :)
Status | Ready to Commit | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2015-07-19 16:16:41 |
Closed_By | ⇒ | wilsonge |
Labels |
Removed:
?
|
May this be related? #6452 (comment)
Apparently the cookie isn't read when "Remove URL Language Code" is disabled (when enabled it works fine).