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

Merged
merged 1 commit into from Mar 16, 2015

Conversation

Projects
None yet
8 participants
@Hackwar
Member

Hackwar commented Mar 11, 2015

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.

@aruttkamp

This comment has been minimized.

aruttkamp commented Mar 14, 2015

tested - ok


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

@zero-24

This comment has been minimized.

Contributor

zero-24 commented Mar 14, 2015

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.

@infograf768

This comment has been minimized.

Member

infograf768 commented Mar 16, 2015

let's wait the cookie issue is solved to look at this one again.

@Hackwar

This comment has been minimized.

Member

Hackwar commented Mar 16, 2015

Why? Should we stop looking at issues in JForm, too, because of the cookie issue? Those 2 are completely different topics.

@infograf768

This comment has been minimized.

Member

infograf768 commented Mar 16, 2015

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.

@Hackwar

This comment has been minimized.

Member

Hackwar commented Mar 16, 2015

The proposal by @Bakual does not touch this code.

@Bakual

This comment has been minimized.

Contributor

Bakual commented Mar 16, 2015

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?

@gwsdesk

This comment has been minimized.

gwsdesk commented Mar 16, 2015

@test works4me . I cannot judge if sense or not. The tests of PR by Bakual were successful (2/3 tests). I tested this now with #6452 installed and this still works4me

@Hackwar

This comment has been minimized.

Member

Hackwar commented Mar 16, 2015

The comment might have to be adapted.

@Kubik-Rubik

This comment has been minimized.

Member

Kubik-Rubik commented Mar 16, 2015

Works as described, thanks @Hackwar!

Kubik-Rubik added a commit that referenced this pull request Mar 16, 2015

Merge pull request #6400 from Hackwar/patch-42
Checking if the lang_code was already set in POST

@Kubik-Rubik Kubik-Rubik merged commit 3444f1c into joomla:staging Mar 16, 2015

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@Kubik-Rubik Kubik-Rubik added this to the Joomla! 3.4.1 milestone Mar 16, 2015

@ghost

This comment has been minimized.

ghost commented Mar 16, 2015

The $lang_code could be not initialised in your check yet.
So shouldn't it be:

if (!isset($lang_code))

@Hackwar Hackwar deleted the Hackwar:patch-42 branch Mar 16, 2015

@Kubik-Rubik

This comment has been minimized.

Member

Kubik-Rubik commented Mar 16, 2015

@nonumber Thank you for the catch, fixed with: #6458

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment