JSUBMENU-001
JSubMenuHelper::addEntry()
JSubMenuHelper
JSubMenuHelper was removed in Joomla 4. Admin chrome uses the sidebar helper.
JSubMenuHelper::addEntry() → HTMLHelper::_('sidebar.addEntry') plus the sidebar view placeholder
What you will see
- Class "JSubMenuHelper" not found
Symptoms people search
admin submenu missing
Replace this code
Swap JSubMenuHelper::addEntry() for HTMLHelper::_('sidebar.addEntry') plus the sidebar view placeholder.
Joomla 3
Remove or stop calling this
JSubMenuHelper::addEntry('Courses', 'index.php?option=com_lms', $vName == 'courses');Joomla 4 / 6
Use this instead
HTMLHelper::_('sidebar.addEntry', 'Courses', 'index.php?option=com_lms', $vName == 'courses');
// Echo the sidebar in the view layout.How to fix it
- 1Replace JSubMenuHelper with sidebar.addEntry.
- 2Add the sidebar render in the admin view.
Also known as
JSubMenuHelper::addEntry()
Related issues
- Joomla 3 → 4Joomla API
JRequest::getVar() and the whole JRequest API
JRequest::getVar() → $app->getInput()->get('id')
- Joomla 3 → 4Joomla API
JError / JException
JError::raiseError() → throw new RuntimeException() / try-catch
- Joomla 3 → 4Joomla API
isAdmin() / isSite()
$app->isAdmin() → $app->isClient('administrator') / isClient('site')
- Joomla 3 → 4Joomla API
Factory::getUri()
JFactory::getUri() → Uri::getInstance()
- Joomla 3 → 4Joomla API
Factory::getXml() / JXMLElement
JFactory::getXML() → SimpleXMLElement
- Joomla 3 → 4Joomla API
Factory::getEditor()
JFactory::getEditor() → Editor::getInstance()