Joomla JFactory & application changes: Joomla 3 → 4, 5 and 6

32 issues in this guide

JFactory and the old application stack dominate Joomla 3 to 6 fatals. This guide groups 32 entries covering $app->isAdmin(), $app->redirect($url, $msg, 'error'), plg_behaviour_compat, plg_behaviour_compat6, JApplicationHelper::parseXMLLangMetaFile(), JApplicationAdministrator, JApplicationBase, JApplicationCms, JApplicationHelper, JApplicationSite, and 22 more. The general replacement is Factory::getApplication() or the DI container, then application services (getIdentity, getSession, getLanguage, getDocument, getConfig) instead of static JFactory calls. Client checks move to isClient('administrator') / isClient('site'); redirect messages enqueue first, then redirect($url). Behaviour – Backward Compatibility and Behaviour – Backward Compatibility 6 are documented so you know which plugin covers J* aliases. Hop mix: 8 at Joomla 3 → 4; 24 at Joomla 5 → 6. On Joomla 4 many names still resolve via aliases; native Joomla 6 does not. Disable the BC plugin on a Joomla 5 staging site and match every Class "J…" not found against the anchors below. Catalog replacements in this guide include $app->isAdmin() → $app->isClient('administrator') / isClient('site'); $app->redirect($url, $msg, 'error') → enqueueMessage then redirect($url); plg_behaviour_compat → Rewrite J* classes so BC5 can stay off, then upgrade to Joomla 6; plg_behaviour_compat6 → Does not restore JFactory / JRequest / MooTools. Open each h2 anchor for the full before/after, fix list, and error strings shipped in the reference data.

APP-ISADMIN-001

$app->isAdmin()

isAdmin() / isSite()

Joomla 4 can have more application clients than site/admin. isAdmin and isSite were removed. isClient() is the replacement.

$app->isAdmin() → $app->isClient('administrator') / isClient('site')

Dies at Joomla 3 → 4
Dies at Joomla 3 → 4J3: Works nativelyJ4: Removed — fatalJ6: Removed — fatalBC plugin: no — already dead on J4Mechanical renameJoomla API

What you will see

  • Call to undefined method ...::isAdmin()
  • Call to undefined method ...::isSite()

Symptoms people search

admin-only code runs on the site · undefined method isAdmin

Replace this code

Swap $app->isAdmin() for $app->isClient('administrator') / isClient('site').

Joomla 3

Remove or stop calling this

if ($app->isAdmin()) { ... }
if ($app->isSite()) { ... }

Joomla 4 / 6

Use this instead

if ($app->isClient('administrator')) { ... }
if ($app->isClient('site')) { ... }

How to fix it

  1. 1Replace isAdmin() with isClient('administrator').
  2. 2Replace isSite() with isClient('site').

Also known as

isAdmin · isSite · isClient

APP-REDIRECT-MSG-001

$app->redirect($url, $msg, 'error')

redirect($url, $msg, $type) old signature

Joomla 4 redirect no longer takes message + type. Passing them fatals or ignores.

$app->redirect($url, $msg, 'error') → enqueueMessage then redirect($url)

Dies at Joomla 3 → 4
Dies at Joomla 3 → 4J3: Works nativelyJ4: Removed — fatalJ6: Removed — fatalBC plugin: no — already dead on J4Patch possible — review itJoomla API

What you will see

  • Too many arguments to function ...::redirect

Symptoms people search

redirect 500 after save

Replace this code

Swap $app->redirect($url, $msg, 'error') for enqueueMessage then redirect($url).

Joomla 3

Remove or stop calling this

$app->redirect('index.php?option=com_lms', 'Saved', 'message');

Joomla 4 / 6

Use this instead

$app->enqueueMessage('Saved');
$app->redirect('index.php?option=com_lms');

How to fix it

  1. 1enqueueMessage first.
  2. 2redirect with URL (and optional HTTP code) only.

Also known as

redirect message type

BC5-DISABLE-TEST-001

plg_behaviour_compat

Site dies when you disable Behaviour – Backward Compatibility

There are two plugins. Behaviour – Backward Compatibility (no number) restores JFactory, JText, JHtml, and hundreds of J* names on Joomla 5. You MUST disable it before Joomla 6. Behaviour – Backward Compatibility 6 is a different plugin and does not restore JRequest or JFactory. If disabling the first plugin whitescreens the site, you are not Joomla 6 ready.

plg_behaviour_compat → Rewrite J* classes so BC5 can stay off, then upgrade to Joomla 6

Dies at Joomla 5 → 6
Dies at Joomla 5 → 6J3: Works nativelyJ4: Alias (old name still resolves)J6: Removed — fatalBC plugin: covers the class nameYou rewrite thisJoomla API

What you will see

  • Class "JFactory" not found
  • Class "JText" not found
  • Class "JHtml" not found

Symptoms people search

white screen after disabling compatibility plugin · cannot upgrade to Joomla 6 · plugin required for site to load · backward compatibility

Replace this code

Swap plg_behaviour_compat for Rewrite J* classes so BC5 can stay off, then upgrade to Joomla 6.

Joomla 3

Remove or stop calling this

// Joomla 5 with plugin enabled — site “works”
$app = JFactory::getApplication();

Joomla 4 / 6

Use this instead

use Joomla\CMS\Factory;
$app = Factory::getApplication();
// Then disable the plugin on staging. It must stay off to upgrade to Joomla 6.

How to fix it

  1. 1On Joomla 5.4 staging: System → Plugins → disable Behaviour – Backward Compatibility (no number).
  2. 2Note every Class "J…" not found error. Those are this reference.
  3. 3Fix them, then retry. Only then run the Joomla 6 update.
  4. 4Do not confuse it with Backward Compatibility 6 — that one does not bring J* names back.

Also known as

Behaviour - Backward Compatibility · plg_behaviour_compat · BC plugin · compat plugin · Backward Compatibility 6

BC6-PLUGIN-001

plg_behaviour_compat6

Behaviour – Backward Compatibility 6 (the other plugin)

Two plugins, two jobs. Searching “compatibility plugin” must explain both or people enable the wrong one.

plg_behaviour_compat6 → Does not restore JFactory / JRequest / MooTools

Dies at Joomla 5 → 6
Dies at Joomla 5 → 6J3: Works nativelyJ4: Works nativelyJ6: Changed behaviourBC plugin: not applicableArchitecture change — no auto-fixJoomla API

Symptoms people search

backward compatibility 6 · compat6 · two compatibility plugins

Replace this code

Swap plg_behaviour_compat6 for Does not restore JFactory / JRequest / MooTools.

Joomla 3

Remove or stop calling this

// Confusing this with Behaviour – Backward Compatibility (no number)

Joomla 4 / 6

Use this instead

BC6 helps some Joomla 5→6 namespaced class moves. It will not load J* globals. Disable BC5 before Joomla 6; BC6 is a different plugin.

How to fix it

  1. 1BC5 (no number): J* aliases on Joomla 5. Must be OFF to go to 6.
  2. 2BC6: selected J5→J6 class moves. Enabled on 5.4; disabled on new J6 installs.

Also known as

plg_behaviour_compat6 · Backward Compatibility 6 · BC6

JAPPHELPER-PARSEXML-001

JApplicationHelper::parseXMLLangMetaFile()

JApplicationHelper::parseXMLLangMetaFile

That helper was deleted in Joomla 4.

JApplicationHelper::parseXMLLangMetaFile() → No replacement — use langmetadata.xml APIs

Dies at Joomla 3 → 4
Dies at Joomla 3 → 4J3: Works nativelyJ4: Removed — fatalJ6: Removed — fatalBC plugin: no — already dead on J4Architecture change — no auto-fixJoomla API

What you will see

  • Call to undefined method ...::parseXMLLangMetaFile

Symptoms people search

language pack install helper fatal

Replace this code

Swap JApplicationHelper::parseXMLLangMetaFile() for No replacement — use langmetadata.xml APIs.

Joomla 3

Remove or stop calling this

JApplicationHelper::parseXMLLangMetaFile($path);

Joomla 4 / 6

Use this instead

Read language metadata through LanguageHelper / langmetadata.xml. Do not call parseXMLLangMetaFile.

How to fix it

  1. 1Stop calling it.
  2. 2Parse langmetadata.xml if you need metadata.

Also known as

parseXMLLangMetaFile

There is no 1:1 swap for this one. The architecture changed. If you cannot rewrite it, Infyways can.

JAPPLICATIONADMIN-CLASS-001

JApplicationAdministrator

JApplicationAdministrator class name

JApplicationAdministrator 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 "JApplicationAdministrator" not found.

JApplicationAdministrator → Joomla\CMS\Application\AdministratorApplication

Dies at Joomla 5 → 6
Dies at Joomla 5 → 6J3: Works nativelyJ4: Alias (old name still resolves)J6: Removed — fatalBC plugin: covers the class nameMechanical renameJoomla API

What you will see

  • Class "JApplicationAdministrator" not found
  • Class 'JApplicationAdministrator' not found
  • Failed to open stream: JApplicationAdministrator

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 JApplicationAdministrator for Joomla\CMS\Application\AdministratorApplication.

Joomla 3

Remove or stop calling this

JApplicationAdministrator::getInstance();
// or new JApplicationAdministrator()

Joomla 4 / 6

Use this instead

use Joomla\CMS\Application\AdministratorApplication;

// Call the namespaced class. Do not keep the J prefix.

How to fix it

  1. 1Add a use statement for Joomla\CMS\Application\AdministratorApplication.
  2. 2Replace every JApplicationAdministrator with the short class name from that use line.
  3. 3Disable Behaviour – Backward Compatibility on a Joomla 5 staging site. If it fatals, this class is still in the code.

Also known as

JApplicationAdministrator · Joomla\CMS\Application\AdministratorApplication · class alias · J prefix

JAPPLICATIONBASE-CLASS-001

JApplicationBase

JApplicationBase class name

JApplicationBase 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 "JApplicationBase" not found.

JApplicationBase → Joomla\CMS\Application\BaseApplication

Dies at Joomla 5 → 6
Dies at Joomla 5 → 6J3: Works nativelyJ4: Alias (old name still resolves)J6: Removed — fatalBC plugin: covers the class nameMechanical renameJoomla API

What you will see

  • Class "JApplicationBase" not found
  • Class 'JApplicationBase' not found
  • Failed to open stream: JApplicationBase

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 JApplicationBase for Joomla\CMS\Application\BaseApplication.

Joomla 3

Remove or stop calling this

JApplicationBase::getInstance();
// or new JApplicationBase()

Joomla 4 / 6

Use this instead

use Joomla\CMS\Application\BaseApplication;

// Call the namespaced class. Do not keep the J prefix.

How to fix it

  1. 1Add a use statement for Joomla\CMS\Application\BaseApplication.
  2. 2Replace every JApplicationBase with the short class name from that use line.
  3. 3Disable Behaviour – Backward Compatibility on a Joomla 5 staging site. If it fatals, this class is still in the code.

Also known as

JApplicationBase · Joomla\CMS\Application\BaseApplication · class alias · J prefix

JAPPLICATIONCMS-CLASS-001

JApplicationCms

JApplicationCms class name

JApplicationCms 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 "JApplicationCms" not found.

JApplicationCms → Joomla\CMS\Application\CMSApplication

Dies at Joomla 5 → 6
Dies at Joomla 5 → 6J3: Works nativelyJ4: Alias (old name still resolves)J6: Removed — fatalBC plugin: covers the class nameMechanical renameJoomla API

What you will see

  • Class "JApplicationCms" not found
  • Class 'JApplicationCms' not found
  • Failed to open stream: JApplicationCms

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 JApplicationCms for Joomla\CMS\Application\CMSApplication.

Joomla 3

Remove or stop calling this

JApplicationCms::getInstance();
// or new JApplicationCms()

Joomla 4 / 6

Use this instead

use Joomla\CMS\Application\CMSApplication;

// Call the namespaced class. Do not keep the J prefix.

How to fix it

  1. 1Add a use statement for Joomla\CMS\Application\CMSApplication.
  2. 2Replace every JApplicationCms with the short class name from that use line.
  3. 3Disable Behaviour – Backward Compatibility on a Joomla 5 staging site. If it fatals, this class is still in the code.

Also known as

JApplicationCms · Joomla\CMS\Application\CMSApplication · class alias · J prefix

JAPPLICATIONHELPER-CLASS-001

JApplicationHelper

JApplicationHelper class name

JApplicationHelper 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 "JApplicationHelper" not found.

JApplicationHelper → Joomla\CMS\Application\ApplicationHelper

Dies at Joomla 5 → 6
Dies at Joomla 5 → 6J3: Works nativelyJ4: Alias (old name still resolves)J6: Removed — fatalBC plugin: covers the class nameMechanical renameJoomla API

What you will see

  • Class "JApplicationHelper" not found
  • Class 'JApplicationHelper' not found
  • Failed to open stream: JApplicationHelper

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 JApplicationHelper for Joomla\CMS\Application\ApplicationHelper.

Joomla 3

Remove or stop calling this

JApplicationHelper::getInstance();
// or new JApplicationHelper()

Joomla 4 / 6

Use this instead

use Joomla\CMS\Application\ApplicationHelper;

// Call the namespaced class. Do not keep the J prefix.

How to fix it

  1. 1Add a use statement for Joomla\CMS\Application\ApplicationHelper.
  2. 2Replace every JApplicationHelper with the short class name from that use line.
  3. 3Disable Behaviour – Backward Compatibility on a Joomla 5 staging site. If it fatals, this class is still in the code.

Also known as

JApplicationHelper · Joomla\CMS\Application\ApplicationHelper · class alias · J prefix

JAPPLICATIONSITE-CLASS-001

JApplicationSite

JApplicationSite class name

JApplicationSite 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 "JApplicationSite" not found.

JApplicationSite → Joomla\CMS\Application\SiteApplication

Dies at Joomla 5 → 6
Dies at Joomla 5 → 6J3: Works nativelyJ4: Alias (old name still resolves)J6: Removed — fatalBC plugin: covers the class nameMechanical renameJoomla API

What you will see

  • Class "JApplicationSite" not found
  • Class 'JApplicationSite' not found
  • Failed to open stream: JApplicationSite

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 JApplicationSite for Joomla\CMS\Application\SiteApplication.

Joomla 3

Remove or stop calling this

JApplicationSite::getInstance();
// or new JApplicationSite()

Joomla 4 / 6

Use this instead

use Joomla\CMS\Application\SiteApplication;

// Call the namespaced class. Do not keep the J prefix.

How to fix it

  1. 1Add a use statement for Joomla\CMS\Application\SiteApplication.
  2. 2Replace every JApplicationSite with the short class name from that use line.
  3. 3Disable Behaviour – Backward Compatibility on a Joomla 5 staging site. If it fatals, this class is still in the code.

Also known as

JApplicationSite · Joomla\CMS\Application\SiteApplication · class alias · J prefix

JAPPLICATIONWEB-CLASS-001

JApplicationWeb

JApplicationWeb class name

JApplicationWeb 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 "JApplicationWeb" not found.

JApplicationWeb → Joomla\CMS\Application\WebApplication

Dies at Joomla 5 → 6
Dies at Joomla 5 → 6J3: Works nativelyJ4: Alias (old name still resolves)J6: Removed — fatalBC plugin: covers the class nameMechanical renameJoomla API

What you will see

  • Class "JApplicationWeb" not found
  • Class 'JApplicationWeb' not found
  • Failed to open stream: JApplicationWeb

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 JApplicationWeb for Joomla\CMS\Application\WebApplication.

Joomla 3

Remove or stop calling this

JApplicationWeb::getInstance();
// or new JApplicationWeb()

Joomla 4 / 6

Use this instead

use Joomla\CMS\Application\WebApplication;

// Call the namespaced class. Do not keep the J prefix.

How to fix it

  1. 1Add a use statement for Joomla\CMS\Application\WebApplication.
  2. 2Replace every JApplicationWeb with the short class name from that use line.
  3. 3Disable Behaviour – Backward Compatibility on a Joomla 5 staging site. If it fatals, this class is still in the code.

Also known as

JApplicationWeb · Joomla\CMS\Application\WebApplication · class alias · J prefix

JDOCUMENT-CLASS-001

JDocument

JDocument class name

JDocument 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 "JDocument" not found.

JDocument → Joomla\CMS\Document\Document

Dies at Joomla 5 → 6
Dies at Joomla 5 → 6J3: Works nativelyJ4: Alias (old name still resolves)J6: Removed — fatalBC plugin: covers the class nameMechanical renameJoomla API

What you will see

  • Class "JDocument" not found
  • Class 'JDocument' not found
  • Failed to open stream: JDocument

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 JDocument for Joomla\CMS\Document\Document.

Joomla 3

Remove or stop calling this

JDocument::getInstance();
// or new JDocument()

Joomla 4 / 6

Use this instead

use Joomla\CMS\Document\Document;

// Call the namespaced class. Do not keep the J prefix.

How to fix it

  1. 1Add a use statement for Joomla\CMS\Document\Document.
  2. 2Replace every JDocument with the short class name from that use line.
  3. 3Disable Behaviour – Backward Compatibility on a Joomla 5 staging site. If it fatals, this class is still in the code.

Also known as

JDocument · Joomla\CMS\Document\Document · class alias · J prefix

JDOCUMENTERROR-CLASS-001

JDocumentError

JDocumentError class name

JDocumentError 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 "JDocumentError" not found.

JDocumentError → Joomla\CMS\Document\ErrorDocument

Dies at Joomla 5 → 6
Dies at Joomla 5 → 6J3: Works nativelyJ4: Alias (old name still resolves)J6: Removed — fatalBC plugin: covers the class nameMechanical renameJoomla API

What you will see

  • Class "JDocumentError" not found
  • Class 'JDocumentError' not found
  • Failed to open stream: JDocumentError

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 JDocumentError for Joomla\CMS\Document\ErrorDocument.

Joomla 3

Remove or stop calling this

JDocumentError::getInstance();
// or new JDocumentError()

Joomla 4 / 6

Use this instead

use Joomla\CMS\Document\ErrorDocument;

// Call the namespaced class. Do not keep the J prefix.

How to fix it

  1. 1Add a use statement for Joomla\CMS\Document\ErrorDocument.
  2. 2Replace every JDocumentError with the short class name from that use line.
  3. 3Disable Behaviour – Backward Compatibility on a Joomla 5 staging site. If it fatals, this class is still in the code.

Also known as

JDocumentError · Joomla\CMS\Document\ErrorDocument · class alias · J prefix

JDOCUMENTFEED-CLASS-001

JDocumentFeed

JDocumentFeed class name

JDocumentFeed 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 "JDocumentFeed" not found.

JDocumentFeed → Joomla\CMS\Document\FeedDocument

Dies at Joomla 5 → 6
Dies at Joomla 5 → 6J3: Works nativelyJ4: Alias (old name still resolves)J6: Removed — fatalBC plugin: covers the class nameMechanical renameJoomla API

What you will see

  • Class "JDocumentFeed" not found
  • Class 'JDocumentFeed' not found
  • Failed to open stream: JDocumentFeed

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 JDocumentFeed for Joomla\CMS\Document\FeedDocument.

Joomla 3

Remove or stop calling this

JDocumentFeed::getInstance();
// or new JDocumentFeed()

Joomla 4 / 6

Use this instead

use Joomla\CMS\Document\FeedDocument;

// Call the namespaced class. Do not keep the J prefix.

How to fix it

  1. 1Add a use statement for Joomla\CMS\Document\FeedDocument.
  2. 2Replace every JDocumentFeed with the short class name from that use line.
  3. 3Disable Behaviour – Backward Compatibility on a Joomla 5 staging site. If it fatals, this class is still in the code.

Also known as

JDocumentFeed · Joomla\CMS\Document\FeedDocument · class alias · J prefix

JDOCUMENTHTML-CLASS-001

JDocumentHtml

JDocumentHtml class name

JDocumentHtml 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 "JDocumentHtml" not found.

JDocumentHtml → Joomla\CMS\Document\HtmlDocument

Dies at Joomla 5 → 6
Dies at Joomla 5 → 6J3: Works nativelyJ4: Alias (old name still resolves)J6: Removed — fatalBC plugin: covers the class nameMechanical renameJoomla API

What you will see

  • Class "JDocumentHtml" not found
  • Class 'JDocumentHtml' not found
  • Failed to open stream: JDocumentHtml

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 JDocumentHtml for Joomla\CMS\Document\HtmlDocument.

Joomla 3

Remove or stop calling this

JDocumentHtml::getInstance();
// or new JDocumentHtml()

Joomla 4 / 6

Use this instead

use Joomla\CMS\Document\HtmlDocument;

// Call the namespaced class. Do not keep the J prefix.

How to fix it

  1. 1Add a use statement for Joomla\CMS\Document\HtmlDocument.
  2. 2Replace every JDocumentHtml with the short class name from that use line.
  3. 3Disable Behaviour – Backward Compatibility on a Joomla 5 staging site. If it fatals, this class is still in the code.

Also known as

JDocumentHtml · Joomla\CMS\Document\HtmlDocument · class alias · J prefix

JDOCUMENTJSON-CLASS-001

JDocumentJson

JDocumentJson class name

JDocumentJson 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 "JDocumentJson" not found.

JDocumentJson → Joomla\CMS\Document\JsonDocument

Dies at Joomla 5 → 6
Dies at Joomla 5 → 6J3: Works nativelyJ4: Alias (old name still resolves)J6: Removed — fatalBC plugin: covers the class nameMechanical renameJoomla API

What you will see

  • Class "JDocumentJson" not found
  • Class 'JDocumentJson' not found
  • Failed to open stream: JDocumentJson

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 JDocumentJson for Joomla\CMS\Document\JsonDocument.

Joomla 3

Remove or stop calling this

JDocumentJson::getInstance();
// or new JDocumentJson()

Joomla 4 / 6

Use this instead

use Joomla\CMS\Document\JsonDocument;

// Call the namespaced class. Do not keep the J prefix.

How to fix it

  1. 1Add a use statement for Joomla\CMS\Document\JsonDocument.
  2. 2Replace every JDocumentJson with the short class name from that use line.
  3. 3Disable Behaviour – Backward Compatibility on a Joomla 5 staging site. If it fatals, this class is still in the code.

Also known as

JDocumentJson · Joomla\CMS\Document\JsonDocument · class alias · J prefix · JDocumentJSON

JDOCUMENTRAW-CLASS-001

JDocumentRaw

JDocumentRaw class name

JDocumentRaw 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 "JDocumentRaw" not found.

JDocumentRaw → Joomla\CMS\Document\RawDocument

Dies at Joomla 5 → 6
Dies at Joomla 5 → 6J3: Works nativelyJ4: Alias (old name still resolves)J6: Removed — fatalBC plugin: covers the class nameMechanical renameJoomla API

What you will see

  • Class "JDocumentRaw" not found
  • Class 'JDocumentRaw' not found
  • Failed to open stream: JDocumentRaw

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 JDocumentRaw for Joomla\CMS\Document\RawDocument.

Joomla 3

Remove or stop calling this

JDocumentRaw::getInstance();
// or new JDocumentRaw()

Joomla 4 / 6

Use this instead

use Joomla\CMS\Document\RawDocument;

// Call the namespaced class. Do not keep the J prefix.

How to fix it

  1. 1Add a use statement for Joomla\CMS\Document\RawDocument.
  2. 2Replace every JDocumentRaw with the short class name from that use line.
  3. 3Disable Behaviour – Backward Compatibility on a Joomla 5 staging site. If it fatals, this class is still in the code.

Also known as

JDocumentRaw · Joomla\CMS\Document\RawDocument · class alias · J prefix

JDOCUMENTXML-CLASS-001

JDocumentXml

JDocumentXml class name

JDocumentXml 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 "JDocumentXml" not found.

JDocumentXml → Joomla\CMS\Document\XmlDocument

Dies at Joomla 5 → 6
Dies at Joomla 5 → 6J3: Works nativelyJ4: Alias (old name still resolves)J6: Removed — fatalBC plugin: covers the class nameMechanical renameJoomla API

What you will see

  • Class "JDocumentXml" not found
  • Class 'JDocumentXml' not found
  • Failed to open stream: JDocumentXml

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 JDocumentXml for Joomla\CMS\Document\XmlDocument.

Joomla 3

Remove or stop calling this

JDocumentXml::getInstance();
// or new JDocumentXml()

Joomla 4 / 6

Use this instead

use Joomla\CMS\Document\XmlDocument;

// Call the namespaced class. Do not keep the J prefix.

How to fix it

  1. 1Add a use statement for Joomla\CMS\Document\XmlDocument.
  2. 2Replace every JDocumentXml with the short class name from that use line.
  3. 3Disable Behaviour – Backward Compatibility on a Joomla 5 staging site. If it fatals, this class is still in the code.

Also known as

JDocumentXml · Joomla\CMS\Document\XmlDocument · class alias · J prefix

JERROR-CLASS-001

JError::raiseError()

JError / JException

JError was Joomla's old error stack. It was deleted in Joomla 4. Compatibility plugins do not restore it. Keep using PHP exceptions.

JError::raiseError() → throw new RuntimeException() / try-catch

Dies at Joomla 3 → 4
Dies at Joomla 3 → 4J3: Works nativelyJ4: Removed — fatalJ6: Removed — fatalBC plugin: no — already dead on J4Architecture change — no auto-fixJoomla API

What you will see

  • Class "JError" not found
  • Class "JException" not found

Symptoms people search

500 after save · error handling exploded on Joomla 4

Replace this code

Swap JError::raiseError() for throw new RuntimeException() / try-catch.

Joomla 3

Remove or stop calling this

JError::raiseError(500, 'Could not save');
$this->setError($db->getErrorMsg());

Joomla 4 / 6

Use this instead

throw new \RuntimeException('Could not save');
// Catch at the controller and enqueue a message

How to fix it

  1. 1Delete JError::raise* calls.
  2. 2Throw RuntimeException (or a domain exception) instead of setError().
  3. 3In controllers, catch and $app->enqueueMessage().

Also known as

JError · JException · raiseError · setError

There is no 1:1 swap for this one. The architecture changed. If you cannot rewrite it, Infyways can.

JERRORPAGE-CLASS-001

JErrorPage

JErrorPage class name

JErrorPage 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 "JErrorPage" not found.

JErrorPage → Joomla\CMS\Exception\ExceptionHandler

Dies at Joomla 5 → 6
Dies at Joomla 5 → 6J3: Works nativelyJ4: Alias (old name still resolves)J6: Removed — fatalBC plugin: covers the class nameMechanical renameJoomla API

What you will see

  • Class "JErrorPage" not found
  • Class 'JErrorPage' not found
  • Failed to open stream: JErrorPage

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 JErrorPage for Joomla\CMS\Exception\ExceptionHandler.

Joomla 3

Remove or stop calling this

JErrorPage::getInstance();
// or new JErrorPage()

Joomla 4 / 6

Use this instead

use Joomla\CMS\Exception\ExceptionHandler;

// Call the namespaced class. Do not keep the J prefix.

How to fix it

  1. 1Add a use statement for Joomla\CMS\Exception\ExceptionHandler.
  2. 2Replace every JErrorPage with the short class name from that use line.
  3. 3Disable Behaviour – Backward Compatibility on a Joomla 5 staging site. If it fatals, this class is still in the code.

Also known as

JErrorPage · Joomla\CMS\Exception\ExceptionHandler · class alias · J prefix

JFACTORY-CLASS-001

JFactory

JFactory class name

JFactory 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 "JFactory" not found.

JFactory → Joomla\CMS\Factory

Dies at Joomla 5 → 6
Dies at Joomla 5 → 6J3: Works nativelyJ4: Alias (old name still resolves)J6: Removed — fatalBC plugin: covers the class nameMechanical renameJoomla API

What you will see

  • Class "JFactory" not found
  • Class 'JFactory' not found
  • Failed to open stream: JFactory

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 · JFactory after upgrade · compat plugin required

Replace this code

Swap JFactory for Joomla\CMS\Factory.

Joomla 3

Remove or stop calling this

JFactory::getInstance();
// or new JFactory()

Joomla 4 / 6

Use this instead

use Joomla\CMS\Factory;

// Call the namespaced class. Do not keep the J prefix.

How to fix it

  1. 1Add a use statement for Joomla\CMS\Factory.
  2. 2Replace every JFactory with the short class name from that use line.
  3. 3Disable Behaviour – Backward Compatibility on a Joomla 5 staging site. If it fatals, this class is still in the code.

Also known as

JFactory · Joomla\CMS\Factory · class alias · J prefix

JFACTORY-GETAPPLICATION-001

JFactory::getApplication('site')

Factory::getApplication($client) arguments

You cannot ask Factory for a different client anymore. The argument is ignored or removed. There is one application.

JFactory::getApplication('site') → Factory::getApplication() with no client; then isClient()

Dies at Joomla 3 → 4
Dies at Joomla 3 → 4J3: Works nativelyJ4: Changed behaviourJ6: Changed behaviourBC plugin: not applicablePatch possible — review itJoomla API

Symptoms people search

always got site app in admin · getApplication site

Replace this code

Swap JFactory::getApplication('site') for Factory::getApplication() with no client; then isClient().

Joomla 3

Remove or stop calling this

$app = JFactory::getApplication('site');
$admin = JFactory::getApplication('administrator');

Joomla 4 / 6

Use this instead

$app = Factory::getApplication();
if ($app->isClient('administrator')) {}

How to fix it

  1. 1Call getApplication() with no arguments.
  2. 2Branch with isClient('site'|'administrator').

Also known as

getApplication('site') · getApplication('administrator')

JFACTORY-GETCACHE-001

JFactory::getCache()

Factory::getCache()

getCache() is a service locator. Joomla 4+ wants the cache controller factory.

JFactory::getCache() → Cache controller from the container

Dies at Joomla 5 → 6
Dies at Joomla 5 → 6J3: Works nativelyJ4: Deprecated — do not shipJ6: Deprecated — do not shipBC plugin: not applicablePatch possible — review itJoomla API

What you will see

  • Factory::getCache is deprecated

Symptoms people search

getCache deprecation

Replace this code

Swap JFactory::getCache() for Cache controller from the container.

Joomla 3

Remove or stop calling this

$cache = JFactory::getCache('com_lms', 'output');

Joomla 4 / 6

Use this instead

$cache = Factory::getContainer()->get(\Joomla\CMS\Cache\CacheControllerFactoryInterface::class)
    ->createCacheController('output', ['defaultgroup' => 'com_lms']);

How to fix it

  1. 1Resolve CacheControllerFactoryInterface from the container.

Also known as

getCache

JFACTORY-GETCONFIG-001

JFactory::getConfig()

Factory::getConfig()

Config lives on the application. Factory::getConfig() is deprecated.

JFactory::getConfig() → $app->getConfig() / $app->get('sitename')

Dies at Joomla 5 → 6
Dies at Joomla 5 → 6J3: Works nativelyJ4: Deprecated — do not shipJ6: Deprecated — do not shipBC plugin: not applicablePatch possible — review itJoomla API

What you will see

  • Factory::getConfig is deprecated

Symptoms people search

getConfig deprecation

Replace this code

Swap JFactory::getConfig() for $app->getConfig() / $app->get('sitename').

Joomla 3

Remove or stop calling this

$sitename = JFactory::getConfig()->get('sitename');

Joomla 4 / 6

Use this instead

$sitename = Factory::getApplication()->get('sitename');

How to fix it

  1. 1Prefer $app->get($key).
  2. 2Or $app->getConfig().

Also known as

getConfig

JFACTORY-GETDOCUMENT-001

JFactory::getDocument()

Factory::getDocument()

Document is owned by the application. Factory::getDocument() is deprecated.

JFactory::getDocument() → $app->getDocument()

Dies at Joomla 5 → 6
Dies at Joomla 5 → 6J3: Works nativelyJ4: Deprecated — do not shipJ6: Deprecated — do not shipBC plugin: not applicablePatch possible — review itJoomla API

What you will see

  • Factory::getDocument is deprecated

Symptoms people search

getDocument deprecation

Replace this code

Swap JFactory::getDocument() for $app->getDocument().

Joomla 3

Remove or stop calling this

$doc = JFactory::getDocument();
$doc->setTitle('Courses');

Joomla 4 / 6

Use this instead

$doc = Factory::getApplication()->getDocument();

How to fix it

  1. 1Use $app->getDocument().

Also known as

getDocument

JFACTORY-GETXML-001

JFactory::getXML()

Factory::getXml() / JXMLElement

JXMLElement and Factory::getXml were removed. PHP's SimpleXML is the replacement.

JFactory::getXML() → SimpleXMLElement

Dies at Joomla 3 → 4
Dies at Joomla 3 → 4J3: Works nativelyJ4: Removed — fatalJ6: Removed — fatalBC plugin: no — already dead on J4Patch possible — review itJoomla API

What you will see

  • Class "JXMLElement" not found
  • Call to undefined method Factory::getXml

Symptoms people search

manifest parse fatal

Replace this code

Swap JFactory::getXML() for SimpleXMLElement.

Joomla 3

Remove or stop calling this

$xml = JFactory::getXML($path, true);

Joomla 4 / 6

Use this instead

$xml = simplexml_load_file($path);
// or new \SimpleXMLElement($string)

How to fix it

  1. 1Use simplexml_load_file or SimpleXMLElement.
  2. 2Add error handling — SimpleXML returns false on bad XML.

Also known as

JXMLElement · getXML · getXml

JOPENSEARCH-CLASS-001

JOpenSearchDocument

JOpenSearchDocument class name

JOpenSearchDocument 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 "JOpenSearchDocument" not found.

JOpenSearchDocument → Joomla\CMS\Document\Opensearch\OpensearchDocument

Dies at Joomla 5 → 6
Dies at Joomla 5 → 6J3: Works nativelyJ4: Alias (old name still resolves)J6: Removed — fatalBC plugin: covers the class nameMechanical renameJoomla API

What you will see

  • Class "JOpenSearchDocument" not found
  • Class 'JOpenSearchDocument' not found
  • Failed to open stream: JOpenSearchDocument

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 JOpenSearchDocument for Joomla\CMS\Document\Opensearch\OpensearchDocument.

Joomla 3

Remove or stop calling this

JOpenSearchDocument::getInstance();
// or new JOpenSearchDocument()

Joomla 4 / 6

Use this instead

use Joomla\CMS\Document\Opensearch\OpensearchDocument;

// Call the namespaced class. Do not keep the J prefix.

How to fix it

  1. 1Add a use statement for Joomla\CMS\Document\Opensearch\OpensearchDocument.
  2. 2Replace every JOpenSearchDocument with the short class name from that use line.
  3. 3Disable Behaviour – Backward Compatibility on a Joomla 5 staging site. If it fatals, this class is still in the code.

Also known as

JOpenSearchDocument · Joomla\CMS\Document\Opensearch\OpensearchDocument · class alias · J prefix

JRESPONSEJSON-CLASS-001

JResponseJson

JResponseJson class name

JResponseJson 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 "JResponseJson" not found.

JResponseJson → Joomla\CMS\Response\JsonResponse

Dies at Joomla 5 → 6
Dies at Joomla 5 → 6J3: Works nativelyJ4: Alias (old name still resolves)J6: Removed — fatalBC plugin: covers the class nameMechanical renameJoomla API

What you will see

  • Class "JResponseJson" not found
  • Class 'JResponseJson' not found
  • Failed to open stream: JResponseJson

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 JResponseJson for Joomla\CMS\Response\JsonResponse.

Joomla 3

Remove or stop calling this

JResponseJson::getInstance();
// or new JResponseJson()

Joomla 4 / 6

Use this instead

use Joomla\CMS\Response\JsonResponse;

// Call the namespaced class. Do not keep the J prefix.

How to fix it

  1. 1Add a use statement for Joomla\CMS\Response\JsonResponse.
  2. 2Replace every JResponseJson with the short class name from that use line.
  3. 3Disable Behaviour – Backward Compatibility on a Joomla 5 staging site. If it fatals, this class is still in the code.

Also known as

JResponseJson · Joomla\CMS\Response\JsonResponse · class alias · J prefix

JVERSION-CLASS-001

JVersion

JVersion class name

JVersion 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 "JVersion" not found.

JVersion → Joomla\CMS\Version

Dies at Joomla 5 → 6
Dies at Joomla 5 → 6J3: Works nativelyJ4: Alias (old name still resolves)J6: Removed — fatalBC plugin: covers the class nameMechanical renameJoomla API

What you will see

  • Class "JVersion" not found
  • Class 'JVersion' not found
  • Failed to open stream: JVersion

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 JVersion for Joomla\CMS\Version.

Joomla 3

Remove or stop calling this

JVersion::getInstance();
// or new JVersion()

Joomla 4 / 6

Use this instead

use Joomla\CMS\Version;

// Call the namespaced class. Do not keep the J prefix.

How to fix it

  1. 1Add a use statement for Joomla\CMS\Version.
  2. 2Replace every JVersion with the short class name from that use line.
  3. 3Disable Behaviour – Backward Compatibility on a Joomla 5 staging site. If it fatals, this class is still in the code.

Also known as

JVersion · Joomla\CMS\Version · class alias · J prefix

JVERSION-RELEASE-001

JVersion::RELEASE

JVersion::RELEASE / DEV_LEVEL / BUILD

The old version constants were removed. JVERSION string still exists but RELEASE/DEV_LEVEL/BUILD do not.

JVersion::RELEASE → MAJOR_VERSION, MINOR_VERSION, PATCH_VERSION

Dies at Joomla 3 → 4
Dies at Joomla 3 → 4J3: Works nativelyJ4: Removed — fatalJ6: Removed — fatalBC plugin: no — already dead on J4Patch possible — review itJoomla API

What you will see

  • Undefined class constant RELEASE
  • Undefined class constant DEV_LEVEL

Symptoms people search

version check always wrong · JVersion::RELEASE

Replace this code

Swap JVersion::RELEASE for MAJOR_VERSION, MINOR_VERSION, PATCH_VERSION.

Joomla 3

Remove or stop calling this

if (JVERSION == '3.10') {}
echo JVersion::RELEASE . '.' . JVersion::DEV_LEVEL;

Joomla 4 / 6

Use this instead

use Joomla\CMS\Version;
if (Version::MAJOR_VERSION === 4) {}
echo Version::MAJOR_VERSION . '.' . Version::MINOR_VERSION;

How to fix it

  1. 1Use Version::MAJOR_VERSION / MINOR_VERSION / PATCH_VERSION.
  2. 2Do not parse JVERSION as a Joomla 3 string.

Also known as

JVersion::RELEASE · DEV_LEVEL · JVERSION

JWEB-CLASS-001

JWeb

JWeb

JWeb was an old application base. It is obsolete in Joomla 4.

JWeb → WebApplication

Dies at Joomla 3 → 4
Dies at Joomla 3 → 4J3: Works nativelyJ4: Removed — fatalJ6: Removed — fatalBC plugin: no — already dead on J4You rewrite thisJoomla API

What you will see

  • Class "JWeb" not found

Symptoms people search

custom app bootstrap fatal

Replace this code

Swap JWeb for WebApplication.

Joomla 3

Remove or stop calling this

class MyCliWeb extends JWeb {}

Joomla 4 / 6

Use this instead

Extend Joomla\CMS\Application\WebApplication (or CliApplication for CLI).

How to fix it

  1. 1Extend WebApplication / CliApplication.
  2. 2Implement doExecute() if the class is abstract.

Also known as

JWeb

There is no 1:1 swap for this one. The architecture changed. If you cannot rewrite it, Infyways can.

YEARLY-ALIASES-001

JFactory / JText / JHtml everywhere

“It still works with J* aliases” is not Joomla 6 native

Years of “it still works” is why Joomla 6 upgrades white-screen. Aliases are a crutch, not the destination.

JFactory / JText / JHtml everywhere → Namespaced classes, BC plugin off

Dies at Joomla 5 → 6
Dies at Joomla 5 → 6J3: Works nativelyJ4: Alias (old name still resolves)J6: Removed — fatalBC plugin: covers the class nameYou rewrite thisJoomla API

What you will see

  • Class "JFactory" not found

Symptoms people search

it still works on joomla 5 · aliases are fine · we will rename later

Replace this code

Swap JFactory / JText / JHtml everywhere for Namespaced classes, BC plugin off.

Joomla 3

Remove or stop calling this

// “We’ll rename later. Joomla 4 still has aliases.”

Joomla 4 / 6

Use this instead

Disable Behaviour – Backward Compatibility on Joomla 5 staging. Every Class "J…" not found is remaining debt. Native Joomla 6 has no J* globals.

How to fix it

  1. 1Treat every J* as a ticket.
  2. 2Use this reference A–Z, then scan the ZIP.
  3. 3Do not ship a “Joomla 6” extension that still needs the J5 compat plugin.

Also known as

class alias · J prefix · temporary aliases · native joomla 6

Start a project

Have something
to build?

Tell us what you are building. You will hear back from an engineer within one business day.

hello@infyways.com · Remote, working across time zones

Tell us about your project

Fill out the quick form and we'll reach out.