-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixing regression in languagefilter related to cookies #6452
Fixing regression in languagefilter related to cookies #6452
Conversation
(Hopefully) fixed codestyle and removed some unneeded code based on suggestions from Hannes. Thanks! |
Much better! Now cookie works OK with URL Language Code removed. I still get an issue here
Delete all cookies. Quit browser. Relaunch browser. Enter tld root. This happens only when url language code is removed. |
Tested with this code:
and looks like it corrects the issue here. |
Added suggestion by @infograf768. Worked when I tested it. |
@test |
@test works for me also. Get the correct url's |
Great contribution @Bakual! Let's get the new version done and released! |
Fixing regression in languagefilter related to cookies
This issue has not been fixed, cookie language is not remembered |
@xpallicer |
Hello infograf, |
After accessing mysite.com/es, quit the browser and then relaunch and use mysite.com |
Now it works. I think the bug persists if you do not update (save) Joomla global configuration. Thank you. Best regards! |
The config don't matter. What is important is that you cleared the cookies. Especially the one with the path set to something else than |
I cannot get this to work under 3.4.3 as it used to under 3.1.5 (yes I had put off upgrading for some time since initial upgrade failed). I followed this process:
What I want to happen is for the language to be specified by the following in order of priority:
This is indeed what happened under 3.1.5 and reading about the clever work done in this thread I thought it was what you guys were aiming at too. Now it seems to be ignoring point 2 entirely, and the Language Switcher just sets the the URL in menu items, ignoring the cookie entirely for any other URL without a language specification. Am I still doing something wrong? |
The language switcher is the same as "URL". So you either have "URL" or "browser settings". URL obviously has priority over browser settings. @chrisxchrisxchrisx |
Issue
There is currently an issue that the cookie setting isn't respected when you access www.example.com. If you visited the site before and switched the language, it should actually redirect you to that language but it currently will always redirect to the site default language.
Solution
There are already several PRs which are trying to solve this issue. Most of the did detect a part of the problem, but missed another part.
So this is my attemp to merge the best from various PRs to try to get this solved. Hopefully I didn't miss anything myself 😄
What I did:
cookie_path
, which now defaults just to/
like we do in all other instances where we set a cookie within our CMS.Testing