-
-
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
Checking if the lang_code was already set in POST #6400
Conversation
tested - ok This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6400. |
RTC based on testing by @aruttkamp and @kolvar Thanks This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6400. |
let's wait the cookie issue is solved to look at this one again. |
Why? Should we stop looking at issues in JForm, too, because of the cookie issue? Those 2 are completely different topics. |
they may be, but it is likely that the languagefilter code will be changed in an important way to solve the cookie issue. Therefore this would have, if still necessary, to be adapted. |
The proposal by @Bakual does not touch this code. |
What I wonder is if the whole if clause makes sense. The comment says we don't care about language, but we actually do care now. Or am I wrong? |
The comment might have to be adapted. |
Works as described, thanks @Hackwar! |
Checking if the lang_code was already set in POST
The $lang_code could be not initialised in your check yet.
|
If Joomla is requested via POST, we might have already a language defined via the URL and thus don't need to fall back on the cookie value.
Example:
Request via POST to "index.php" => No language given, falling back to cookie or default language
Request via POST to "index.php?lang=en" => Language given, no need to fall back to something else
Request via POST to "/en/component/content/42" => Language given, no need to fall back to something else
Without this path, the last 2 examples will fall back to the default language.