Create a user group as child of Administrator with these global permissions:
Configure All components permissions as such:
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
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).
not displaying the submenus of the type "Add New Article"
IMO this should be the result
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
That does not work here.
Issue is definitely with $createMenu, as you rightfully found out, as setting it to true solves the Fatal error.
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-05-18 19:33:13 |
Closed_By | ⇒ | brianteeman |
Closed as requested
Labels |
Added:
?
|
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"