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
Usage of cookies in plugin language filter #7044
Comments
Adding a parameter to not create/use the cookie is easy. |
Making the cookie secure should be as easy as setting the secure flag in our API when creating it. |
php setcookie has an option for that: Also, if using sef urls with language code is the cookie really needed? If not using lang code in sef urls i understand why the cookie is needed, but with sef urls with lang code the language code always reach the server via the sef url right? Or is there another use for the cookie? |
The language cookie is especially useful when Remove URL Language Code is set. Also to redirect a user after login to his site language when Automatic Language Change is set. |
Our own API has that as well. See https://github.com/joomla/joomla-cms/blob/staging/libraries/vendor/joomla/input/src/Cookie.php#L84. I wonder if it's needed however. Especially on sites with mixed content you could get the issue that you browse the site in german and when you switch to the SSL content you get back to the english (or whatever) one because the cookie would be a different one. |
@Bakual in my humble opinion if a site admin makes the option to put all the site in HTTPS, reggarding the information is sensible or not, the cookies should respect that. Also it seems the language filter plugin is not using joomla API in that reggarding |
@smz Let me merge the other one first. Then you can improve the setLanguageCookie method with this. |
#7061 should fix this... |
Closing as we have a PR by @smz Thanks 😄 |
Issue
The language filter plugin uses cookies to save the user selected language. Two things to consider:
How to test
On a multilanguage website with language filter plugin enabled and check the cookies generated. There will be two cookies (the session cookie and the user language cookie)
System information (as much as possible)
Nginx 1.9.1
PHP 5.6.8
Joomla 3.4.1
The text was updated successfully, but these errors were encountered: