?
avatar infograf768
infograf768
18 May 2016

Create a user group as child of Administrator with these global permissions:

screen shot 2016-05-18 at 11 47 44

Configure All components permissions as such:

screen shot 2016-05-18 at 11 53 39

Fatal error:
( ! ) Fatal error: Call to a member function addChild() on a non-object in /Applications/MAMP/htdocs/testwindows/trunkgitnew/administrator/modules/mod_menu/menu.php on line 59

screen shot 2016-05-18 at 12 02 00

This was working perfectly well before (I don't know when it started to go wrong). I.e. users in demoacces group could access back-end and look at stuff (with a small hack for the toolbar buttons to prevent them from saving anyhting).

avatar infograf768 infograf768 - open - 18 May 2016
avatar infograf768
infograf768 - comment - 18 May 2016

OK, I found the issue:
This group is NOT authorised to create. As soon as I make it able to create then the issue is solved.

IMHO, the fatal error should not happen. It should degrade gracefully by displaying a "You are not authorised to create items here" OR not displaying the submenus of the type "Add New Article"

avatar andrepereiradasilva
andrepereiradasilva - comment - 18 May 2016

not displaying the submenus of the type "Add New Article"

IMO this should be the result

avatar andrepereiradasilva
andrepereiradasilva - comment - 18 May 2016

If you replace this https://github.com/joomla/joomla-cms/blob/staging/administrator/modules/mod_menu/tmpl/default_enabled.php#L132-L141

with this

    if ($createMenu)
    {
        $menu->addChild(new JMenuNode(JText::_('MOD_MENU_MENU_MANAGER_NEW_MENU'), 'index.php?option=com_menus&view=menu&layout=edit', 'class:newarticle'));
        $menu->getParent();
        $menu->addSeparator();
        $menu->addChild(new JMenuNode(JText::_('MOD_MENU_MENUS_ALL_ITEMS'), 'index.php?option=com_menus&view=items&menutype=*', 'class:menumgr'), $createMenu);
        $menu->getParent();
    }

no fatal error

avatar infograf768
infograf768 - comment - 18 May 2016

That does not work here.

avatar infograf768
infograf768 - comment - 18 May 2016

Issue is definitely with $createMenu, as you rightfully found out, as setting it to true solves the Fatal error.

avatar andrepereiradasilva andrepereiradasilva - reference | c126d20 - 18 May 16
avatar andrepereiradasilva
andrepereiradasilva - comment - 18 May 2016

please test #10545

Thsi can be closed.

avatar brianteeman brianteeman - change - 18 May 2016
Status New Closed
Closed_Date 0000-00-00 00:00:00 2016-05-18 19:33:13
Closed_By brianteeman
avatar brianteeman brianteeman - close - 18 May 2016
avatar brianteeman brianteeman - close - 18 May 2016
avatar brianteeman brianteeman - close - 18 May 2016
avatar brianteeman
brianteeman - comment - 18 May 2016

Closed as requested

avatar brianteeman brianteeman - change - 27 May 2016
Labels Added: ?

Add a Comment

Login with GitHub to post a comment