? Success
Pull Request for # 7311

User tests: Successful: Unsuccessful:

avatar Bakual
Bakual
2 Jul 2015

Fixes #7311

Issue

Module, Article and Category creation applies a wrong default values for the access level. Instead of the one from the global config it just takes none, and thus the first in the list is selected.
This is a regression introduced with #6966 and some similar PRs.

Solution

Set the correct default value.

Testing

  • Create an article/module/category and see the preselected access level. If your default one is the first in the list, change it to something else first.
  • Before patch, always the first access level is selected. After patch the default one from the config is preselected.
avatar Bakual Bakual - open - 2 Jul 2015
avatar Bakual Bakual - change - 2 Jul 2015
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 2 Jul 2015
Labels Added: ?
avatar nonumber
nonumber - comment - 2 Jul 2015

You need to check the $filters['access'] for being an empty string too.
The isset($filters['access']) will return true even if empty (as $filters is an array).
So you need to do: (isset($filters['access']) && $filters['access'] !=''`

avatar infograf768
infograf768 - comment - 2 Jul 2015

@nonumber
Although you are theoritically right, it looks like working as is.

avatar Bakual
Bakual - comment - 2 Jul 2015

@infograf768 @nonumber is right. To reproduce activate a search filter. Like one for the categories, then it breaks the access again.

avatar nonumber
nonumber - comment - 2 Jul 2015

Not only theoretically, also practically :)
It is not working for me without the extra check.
This can be due to difference in PHP version (isset() functions a bit differently across versions).

avatar infograf768
infograf768 - comment - 2 Jul 2015

This can be due to difference in PHP version (isset() functions a bit differently across versions).

yep.

avatar Bakual
Bakual - comment - 2 Jul 2015

I changed it to use !emtpy() instead, it should do the same as Peter suggested.

I also changed it for the other lines there.

avatar nonumber
nonumber - comment - 2 Jul 2015

Yes, works for me
I assumed empty() would complain when the key is not found at all, but it doesn't :)

@test: All good

avatar infograf768
infograf768 - comment - 2 Jul 2015

@test
Works fine here.

avatar Bakual
Bakual - comment - 2 Jul 2015

empty() is a boolean check with an isset() integrated :smile:

avatar Bakual Bakual - change - 2 Jul 2015
Labels Added: ?
avatar brianteeman brianteeman - change - 2 Jul 2015
Priority Medium Urgent
avatar brianteeman brianteeman - change - 2 Jul 2015
Status Pending Ready to Commit
avatar brianteeman brianteeman - alter_testresult - 2 Jul 2015 - nonumber: Tested successfully
avatar brianteeman brianteeman - alter_testresult - 2 Jul 2015 - infograf768: Tested successfully
avatar zero-24 zero-24 - change - 2 Jul 2015
Category Administration UI/UX
avatar zero-24 zero-24 - change - 2 Jul 2015
Easy No Yes
avatar brianteeman brianteeman - change - 2 Jul 2015
Rel_Number 0 7311
Relation Type Pull Request for
avatar blueforce blueforce - test_item - 2 Jul 2015 - Tested successfully
avatar zero-24 zero-24 - close - 2 Jul 2015
avatar mbabker mbabker - change - 2 Jul 2015
The description was changed
Status Ready to Commit Closed
Closed_Date 0000-00-00 00:00:00 2015-07-02 13:00:36
Closed_By mbabker
avatar mbabker mbabker - close - 2 Jul 2015
avatar zero-24 zero-24 - change - 14 Oct 2015
Labels Removed: ?

Add a Comment

Login with GitHub to post a comment