JMODELADMIN-CLASS-001
JModelAdmin
JModelAdmin class name
JModelAdmin is a Joomla 3 global class. Joomla 4 still has an alias. Joomla 5 needs the Behaviour – Backward Compatibility plugin. Native Joomla 6 does not load that alias — you get Class "JModelAdmin" not found.
JModelAdmin → Joomla\CMS\MVC\Model\AdminModel
What you will see
- Class "JModelAdmin" not found
- Class 'JModelAdmin' not found
- Failed to open stream: JModelAdmin
Symptoms people search
white screen after disabling compatibility plugin · class not found on Joomla 6 · works on Joomla 5 until I turn off backward compatibility
Replace this code
Swap JModelAdmin for Joomla\CMS\MVC\Model\AdminModel.
Joomla 3
Remove or stop calling this
JModelAdmin::getInstance();
// or new JModelAdmin()Joomla 4 / 6
Use this instead
use Joomla\CMS\MVC\Model\AdminModel;
// Call the namespaced class. Do not keep the J prefix.How to fix it
- 1Add a use statement for Joomla\CMS\MVC\Model\AdminModel.
- 2Replace every JModelAdmin with the short class name from that use line.
- 3Disable Behaviour – Backward Compatibility on a Joomla 5 staging site. If it fatals, this class is still in the code.
Also known as
JModelAdmin · Joomla\CMS\MVC\Model\AdminModel · class alias · J prefix
Related issues
- Joomla 3 → 4SQL / schema
MyISAM engine in install SQL
ENGINE=MyISAM → ENGINE=InnoDB
- Joomla 3 → 4PHP
mysql_* PHP functions
mysql_query() → Joomla DatabaseInterface / mysqli / PDO
- Joomla 3 → 4MVC
getError() / setError() on models and tables
$model->setError() → Exceptions
- Joomla 5 → 6MVC
Table::getInstance()
JTable::getInstance('Content') → MVC / Table factory
- Joomla 3 → 4Joomla API
JMenuItem public $params
$item->params->get('show_title') → getParams() / setParams()
- Joomla 3 → 4Joomla API
Media field #joomlaImage:// paths
images/lms/hero.jpg (raw path) → HTMLHelper::cleanImageURL() / MediaHelper::getCleanMediaFieldValue()