?
avatar joomlabeat
joomlabeat
25 Feb 2017

There is an issue with new menu items that won't obey to the global setting of default access level.
Currently they will use a default access level, if there is a filter previously in the menu items list, but otherwise they will default to the first menu item by viewlevel id.

Steps to reproduce the issue

Set the global setting of default access level to any other View Level than the Public and click to create a new menu item. The new menu item won't use your default View Level as per the global setting. Likely it will still use the Public level.

Expected result

Creating new menu item should have access level preselected as defined in Global config.

Actual result

Creating new menu item won't have that access level.

System information (as much as possible)

Joomla 3.6.5

Additional comments

The problem is inside the loadFormData() method -(administrator/com_menus/models/item.php) ~ line #596
$data['access'] = (isset($filters['access']) ? $filters['access'] : JFactory::getConfig()->get('access'));

It currently checks if $filters['access'] is set - which it seems it is no matter what, so it always return true.
!empty should be used instead, to check if the access element has a value.

avatar joomlabeat joomlabeat - open - 25 Feb 2017
avatar joomla-cms-bot joomla-cms-bot - labeled - 25 Feb 2017
avatar joomlabeat joomlabeat - edited - 25 Feb 2017
avatar zero-24
zero-24 - comment - 25 Feb 2017

closing as there is a PR #14254

avatar zero-24 zero-24 - change - 25 Feb 2017
The description was changed
Status New Closed
Closed_Date 0000-00-00 00:00:00 2017-02-25 18:02:45
Closed_By zero-24
avatar zero-24 zero-24 - close - 25 Feb 2017

Add a Comment

Login with GitHub to post a comment