JREQUEST-GETVAR-001

JRequest::getVar()

JRequest::getVar() and the whole JRequest API

Joomla removed the global request object. There is no class alias and the compatibility plugin does not bring JRequest back. This dies on the first Joomla 4 boot.

JRequest::getVar()$app->getInput()->get('id')

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 "JRequest" not found
  • Call to undefined method JRequest::getVar
  • Call to undefined method JRequest::getInt

Symptoms people search

site dies immediately after Joomla 4 upgrade · component 500 on every page · getVar not found

Replace this code

Swap JRequest::getVar() for $app->getInput()->get('id').

Joomla 3

Remove or stop calling this

$id = JRequest::getVar('id');
$cid = JRequest::getInt('cid');

Joomla 4 / 6

Use this instead

use Joomla\CMS\Factory;

$app = Factory::getApplication();
$input = $app->getInput();
$id = $input->get('id', 0, 'INT');

How to fix it

  1. 1Get the application, then $app->getInput().
  2. 2Replace getVar/getInt/getCmd with Input::get() and a filter (INT, CMD, STRING).
  3. 3Search the whole ZIP for JRequest — every call is a Joomla 4 blocker.

Also known as

JRequest · getVar · getInt · getCmd · JRequest::get

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.