JMENUITEM-PARAMS-001
$item->params->get('show_title')
JMenuItem public $params
Menu item params are no longer a public Registry property in Joomla 4.
$item->params->get('show_title') → getParams() / setParams()
What you will see
- Attempt to read property "params" on
- Undefined property: MenuItem::$params
Symptoms people search
menu item params empty · item->params
Replace this code
Swap $item->params->get('show_title') for getParams() / setParams().
Joomla 3
Remove or stop calling this
$show = $item->params->get('show_title');Joomla 4 / 6
Use this instead
$show = $item->getParams()->get('show_title');How to fix it
- 1Use getParams().
Also known as
MenuItem params · getParams
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()