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 → 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')

Related issues

Get in touch

Have a project in mind? Let's talk about it.

Tell us what you're building. Whether it's a new site, an online store, a mobile app, or something that needs AI under the hood, we'll get back to you within a business day.

Free consultation
No commitment, no pressure
Reply within 24 hours
Usually much faster

Prefer a direct conversation?

Request a project quote

Tell us about your project

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