? ? Pending

User tests: Successful: Unsuccessful:

avatar laoneo
laoneo
24 Apr 2022

Summary of Changes

The access level edit check for super admins should use the model to fetch the level.

Testing Instructions

  • Create a user which can log in on the back end with the following permissions for the users component
    image
  • Log in as that user on the back end
  • Open the access level list view in the back end
  • Create a new access level without no group assigned
  • Save and close that level
  • Click on the new access level in the list which should redirect then to the access level form

Actual result BEFORE applying this Pull Request

All works but a warning is logged:
Warning: Undefined array key 0 in /administrator/components/com_users/src/Controller/LevelController.php on line 70

Expected result AFTER applying this Pull Request

All works and no warning is logged.

avatar laoneo laoneo - open - 24 Apr 2022
avatar laoneo laoneo - change - 24 Apr 2022
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 24 Apr 2022
Category Administration com_users
avatar laoneo laoneo - change - 25 Apr 2022
Labels Added: ?
avatar toivo
toivo - comment - 26 Apr 2022

I have tested this item ? unsuccessfully on 6977848

Tested in Joomla 4.2.9-alpha2-dev of 25 April in Wampserver 3.2.8 using PHP 8.0.15 and MySQL 8.0.27.
The following warning was displayed before and after the patch was applied in Users: Viewing Access Levels when logged in as the test user with the specified Manager access:

[26-Apr-2022 01:36:15 UTC] PHP Warning: Undefined array key 0 in C:\www\joomla42\administrator\components\com_users\tmpl\levels\default.php on line 86
[26-Apr-2022 01:36:15 UTC] PHP Stack trace:
[26-Apr-2022 01:36:15 UTC] PHP 1. {main}() C:\www\joomla42\administrator\index.php:0
[26-Apr-2022 01:36:15 UTC] PHP 2. require_once() C:\www\joomla42\administrator\index.php:32
[26-Apr-2022 01:36:15 UTC] PHP 3. Joomla\CMS\Application\CMSApplication->execute() C:\www\joomla42\administrator\includes\app.php:63
[26-Apr-2022 01:36:15 UTC] PHP 4. Joomla\CMS\Application\AdministratorApplication->doExecute() C:\www\joomla42\libraries\src\Application\CMSApplication.php:278
[26-Apr-2022 01:36:15 UTC] PHP 5. Joomla\CMS\Application\AdministratorApplication->dispatch($component = uninitialized) C:\www\joomla42\libraries\src\Application\AdministratorApplication.php:186
[26-Apr-2022 01:36:15 UTC] PHP 6. Joomla\CMS\Component\ComponentHelper::renderComponent($option = 'com_users', $params = uninitialized) C:\www\joomla42\libraries\src\Application\AdministratorApplication.php:143
[26-Apr-2022 01:36:15 UTC] PHP 7. Joomla\CMS\Dispatcher\ComponentDispatcher->dispatch() C:\www\joomla42\libraries\src\Component\ComponentHelper.php:389
[26-Apr-2022 01:36:15 UTC] PHP 8. Joomla\CMS\MVC\Controller\BaseController->execute($task = 'display') C:\www\joomla42\libraries\src\Dispatcher\ComponentDispatcher.php:146
[26-Apr-2022 01:36:15 UTC] PHP 9. Joomla\Component\Users\Administrator\Controller\DisplayController->display($cachable = uninitialized, $urlparams = uninitialized) C:\www\joomla42\libraries\src\MVC\Controller\BaseController.php:735
[26-Apr-2022 01:36:15 UTC] PHP 10. Joomla\CMS\MVC\Controller\BaseController->display($cachable = FALSE, $urlparams = []) C:\www\joomla42\administrator\components\com_users\src\Controller\DisplayController.php:135
[26-Apr-2022 01:36:15 UTC] PHP 11. Joomla\Component\Users\Administrator\View\Levels\HtmlView->display($tpl = uninitialized) C:\www\joomla42\libraries\src\MVC\Controller\BaseController.php:697
[26-Apr-2022 01:36:15 UTC] PHP 12. Joomla\CMS\MVC\View\HtmlView->display($tpl = NULL) C:\www\joomla42\administrator\components\com_users\src\View\Levels\HtmlView.php:91
[26-Apr-2022 01:36:15 UTC] PHP 13. Joomla\CMS\MVC\View\HtmlView->loadTemplate($tpl = NULL) C:\www\joomla42\libraries\src\MVC\View\HtmlView.php:220
[26-Apr-2022 01:36:15 UTC] PHP 14. include() C:\www\joomla42\libraries\src\MVC\View\HtmlView.php:436


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/37637.
avatar toivo toivo - test_item - 26 Apr 2022 - Tested unsuccessfully
avatar laoneo
laoneo - comment - 27 Apr 2022

This issue is not related to the pr, but I fixed it here as well. Thanks for the report.

avatar toivo
toivo - comment - 3 May 2022

I have tested this item successfully on 50da8d1

Tested successfully in Joomla 4.2.0-alpha3-dev of 3 May in Wampserver 3.2.8 using PHP 8.0.15


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

avatar toivo toivo - test_item - 3 May 2022 - Tested successfully
avatar pabloarias
pabloarias - comment - 13 May 2022

I have tested this item successfully on 50da8d1

Tested with Joomla 4.2-alpha3-dev and PHP 8.1.5.

Warning logged before apply the path is a little bit different:

PHP Warning: Undefined array key 0 in /administrator/components/com_users/src/Controller/LevelController.php on line 82


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

avatar pabloarias pabloarias - test_item - 13 May 2022 - Tested successfully
avatar Quy Quy - change - 13 May 2022
Status Pending Ready to Commit
avatar Quy
Quy - comment - 13 May 2022

RTC


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

avatar roland-d roland-d - change - 14 May 2022
Labels Added: ?
avatar roland-d roland-d - change - 14 May 2022
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2022-05-14 17:49:40
Closed_By roland-d
avatar roland-d roland-d - close - 14 May 2022
avatar roland-d roland-d - merge - 14 May 2022
avatar roland-d
roland-d - comment - 14 May 2022

Thanks everybody

Add a Comment

Login with GitHub to post a comment