? Success

User tests: Successful: Unsuccessful:

avatar renekorss
renekorss
21 Jan 2016

fixes #8906

Fixes showing administrator side always in en-GB if $_POST has no lang key.

avatar renekorss renekorss - open - 21 Jan 2016
avatar renekorss renekorss - change - 21 Jan 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 21 Jan 2016
Labels Added: ?
avatar wojsmol
wojsmol - comment - 21 Jan 2016
avatar infograf768
infograf768 - comment - 22 Jan 2016

This works but I rather suggest this code:

        if (!($result instanceof Exception))
        {
            $lang = $this->input->getCmd('lang', null);

            if (!is_null($lang))
            {
                $lang = preg_replace('/[^A-Z-]/i', '', $lang);
                $this->setUserState('application.lang', $lang);
            }

            static::purgeMessages();
        }

Except evidently if it does not work with your susoschin (last version?)

avatar renekorss
renekorss - comment - 22 Jan 2016

@infograf768 Thanks. Tested, works with latest suhosin.

avatar infograf768
infograf768 - comment - 22 Jan 2016

@Bakual
Can you check if this is OK?

avatar Bakual
Bakual - comment - 22 Jan 2016

Not sure why you want a default value of null instead of just not giving any default value. Imho

$lang = $this->input->getCmd('lang');

if ($lang)
{
    $lang = preg_replace('/[^A-Z-]/i', '', $lang);
    $this->setUserState('application.lang', $lang);
}

should do the same.

One could also put the preg_replace before the if, so in case the result of the sanitising(?) ends up being empty no UserState is going to be set.
So I would do

$lang = $this->input->getCmd('lang');
$lang = preg_replace('/[^A-Z-]/i', '', $lang);

if ($lang)
{
    $this->setUserState('application.lang', $lang);
}

But I may miss something as I don't know the code in question in detail.

avatar infograf768
infograf768 - comment - 23 Jan 2016

@Bakual
I was mocking up the code in
https://github.com/joomla/joomla-cms/blob/staging/installation/application/web.php#L383-L392

But I see no reason indeed in this case (as we have a default) to not use your proposal.

avatar renekorss
renekorss - comment - 27 Jan 2016

@Bakual @infograf768 I updated code.

avatar infograf768 infograf768 - test_item - 27 Jan 2016 - Tested successfully
avatar infograf768
infograf768 - comment - 27 Jan 2016

I have tested this item :white_check_mark: successfully on 7ebda6c

One more tester to get this in 3.5.0


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

avatar renekorss renekorss - test_item - 27 Jan 2016 - Tested successfully
avatar renekorss
renekorss - comment - 27 Jan 2016

I have tested this item :white_check_mark: successfully on 7ebda6c


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

avatar brianteeman brianteeman - test_item - 27 Jan 2016 - Not tested
avatar brianteeman
brianteeman - comment - 27 Jan 2016

I have not tested this item.

I have not tested this as I can not replicate the issue in order to be able to confirm this PR resolves anything


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

avatar renekorss
renekorss - comment - 27 Jan 2016

@brianteeman Easiest way to test this, is to delete language select input with developer tools, so that $_POST has no lang key. Without this patch, it will default to en-GB despite different default language.

avatar infograf768
infograf768 - comment - 28 Jan 2016

@brianteeman
No need to have the issue to test.
As long as this works for who has the issue AND works in all cases for the others (i.e. all of us).

Tests should include for the user login:
User set to use default admin language
User set to a specific admin language
Login with a different language than those above.

avatar brianteeman
brianteeman - comment - 28 Jan 2016

As long as this works for who has the issue AND works in all cases for the others (i.e. all of us).

Thats fine but I am not going to personally test something that I cannot replicate

avatar brianteeman brianteeman - alter_testresult - 2 Feb 2016 - renekorss: Not tested
avatar brianteeman
brianteeman - comment - 2 Feb 2016

@renekorss I have removed your test report from the count of successful tests. It is assumed that code you submit works ;)

This still needs one more tester


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

avatar renekorss
renekorss - comment - 2 Feb 2016

@brianteeman Sounds logical :)

avatar anibalsanchez anibalsanchez - test_item - 5 Feb 2016 - Tested successfully
avatar anibalsanchez
anibalsanchez - comment - 5 Feb 2016

I have tested this item :white_check_mark: successfully on 7ebda6c

Test OK


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

avatar infograf768 infograf768 - change - 5 Feb 2016
Status Pending Ready to Commit
avatar infograf768
infograf768 - comment - 5 Feb 2016

2 tests OK. RTC


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

avatar joomla-cms-bot joomla-cms-bot - change - 5 Feb 2016
Labels Added: ?
avatar roland-d roland-d - change - 16 Feb 2016
Milestone Added:
avatar roland-d roland-d - reference | 280f9ea - 16 Feb 16
avatar roland-d roland-d - merge - 16 Feb 2016
avatar roland-d roland-d - close - 16 Feb 2016
avatar roland-d roland-d - change - 16 Feb 2016
Status Ready to Commit Closed
Closed_Date 0000-00-00 00:00:00 2016-02-16 17:42:55
Closed_By roland-d
avatar roland-d roland-d - close - 16 Feb 2016
avatar joomla-cms-bot joomla-cms-bot - close - 16 Feb 2016
avatar joomla-cms-bot joomla-cms-bot - change - 16 Feb 2016
Labels Removed: ?
avatar renekorss renekorss - head_ref_deleted - 16 Feb 2016

Add a Comment

Login with GitHub to post a comment