JPLUGIN-CLASS-001
JPlugin
JPlugin class name
JPlugin 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 "JPlugin" not found.
JPlugin → Joomla\CMS\Plugin\CMSPlugin
What you will see
- Class "JPlugin" not found
- Class 'JPlugin' not found
- Failed to open stream: JPlugin
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 · plugin not loading
Replace this code
Swap JPlugin for Joomla\CMS\Plugin\CMSPlugin.
Joomla 3
Remove or stop calling this
JPlugin::getInstance();
// or new JPlugin()Joomla 4 / 6
Use this instead
use Joomla\CMS\Plugin\CMSPlugin;
// Call the namespaced class. Do not keep the J prefix.How to fix it
- 1Add a use statement for Joomla\CMS\Plugin\CMSPlugin.
- 2Replace every JPlugin 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
JPlugin · Joomla\CMS\Plugin\CMSPlugin · class alias · J prefix
Related issues
- Joomla 3 → 4PHP
JPATH_PLATFORM
JPATH_PLATFORM → Do not use — autoload instead
- Joomla 3 → 4Events / plugins
JDispatcher / JEventDispatcher
JDispatcher::getInstance() → Event dispatcher + SubscriberInterface
- Joomla 3 → 4Templates
Protostar site template
Protostar → Cassiopeia (or a Joomla 4+ template), preferably a child template
- Joomla 5 → 6Events / plugins
JPlugin onX methods vs SubscriberInterface
function onContentPrepare(...) → CMSPlugin + SubscriberInterface::getSubscribedEvents()
- Joomla 3 → 4Templates
Magic pagination_item_active functions
function pagination_item_active($item) → Layout joomla.pagination.link
- Joomla 3 → 4Joomla API
JProfiler::getmicrotime / getMemory
JProfiler::getmicrotime() → microtime(true) / memory_get_usage()