?
avatar jameswadsworth
jameswadsworth
27 Jul 2021

This Joomla 4 RC4

Go into admin -> System -> admin modules -> Admin Menu and click on save and close

I would expect the module to save and close correctly

Instead it throws a 500 error Call to a member function authorise() on null in /shared/httpd/jooomla4xxx/public_html/administrator/modules/mod_menu/src/Menu/CssMenu.php (line 416)

                {
                    $parent->removeChild($item);
                    continue;
                }
                elseif (($item->link === 'index.php?option=com_installer&view=install' || $item->link === 'index.php?option=com_installer&view=languages')
                    && !$this->user->authorise('core.admin'))
                {
                    continue;
                }
                elseif ($item->element === 'com_admin')
                {

$this->user is not a populated object and needs converting to $user for it to work correctly.

avatar jameswadsworth jameswadsworth - open - 27 Jul 2021
avatar joomla-cms-bot joomla-cms-bot - change - 27 Jul 2021
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 27 Jul 2021
avatar joomdonation joomdonation - change - 27 Jul 2021
Status New Closed
Closed_Date 0000-00-00 00:00:00 2021-07-27 12:58:40
Closed_By joomdonation
avatar joomdonation joomdonation - close - 27 Jul 2021
avatar joomdonation
joomdonation - comment - 27 Jul 2021

Thanks @jameswadsworth . Your provide solution is correct, in the future, do you mind making PR directly?

For this one, I made the PR #34929 so that it could be merged and included in next RC release (which is planned later today).

Add a Comment

Login with GitHub to post a comment