JACCESS-GETACTIONS-001
JAccess::getActions()
JAccess::getActions()
getActions() was removed in Joomla 4. Load actions from access.xml.
JAccess::getActions() → Access::getActionsFromFile() / getActionsFromData()
What you will see
- Call to undefined method Joomla\CMS\Access\Access::getActions
Symptoms people search
ACL actions empty · getActions undefined
Replace this code
Swap JAccess::getActions() for Access::getActionsFromFile() / getActionsFromData().
Joomla 3
Remove or stop calling this
$actions = JAccess::getActions('com_lms');Joomla 4 / 6
Use this instead
use Joomla\CMS\Access\Access;
$actions = Access::getActionsFromFile(JPATH_ADMINISTRATOR . '/components/com_lms/access.xml');How to fix it
- 1Switch to getActionsFromFile or getActionsFromData.
Also known as
getActions · access.xml
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()