Joomla JRequest & Input changes: Joomla 3 → 4, 5 and 6
9 issues in this guide
Request handling is the other Class not found pair alongside JFactory. This guide groups 9 entries: JFilterInput, JFilterOutput, JInput, JInputCli, JInputCookie, JInputFiles, JInputJSON, JRequest::getVar(), JRequest::getInt(). JRequest::getVar / getInt were removed for Joomla 4; JInput and cookie/files/JSON/CLI input classes remain as aliases through Joomla 5 and disappear on native Joomla 6. InputFilter and OutputFilter follow the same alias story. The replacement pattern is Application-centric: $app = Factory::getApplication(); $input = $app->getInput(); then typed getters instead of JRequest statics. Import Joomla\CMS\Filter\InputFilter / OutputFilter — do not keep JFilter* globals. Hop mix: 2 at Joomla 3 → 4; 7 at Joomla 5 → 6. Because JRequest is already dead on Joomla 4, fix those calls first, then clear remaining JInput / JFilter* hits with the BC plugin off before Joomla 6. Catalog replacements in this guide include JFilterInput → Joomla\CMS\Filter\InputFilter; JFilterOutput → Joomla\CMS\Filter\OutputFilter; JInput → Joomla\CMS\Input\Input; JInputCli → Joomla\CMS\Input\Cli. Open each h2 anchor for the full before/after, fix list, and error strings shipped in the reference data.
JFILTERINPUT-CLASS-001
JFilterInput
JFilterInput class name
JFilterInput 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 "JFilterInput" not found.
JFilterInput → Joomla\CMS\Filter\InputFilter
Dies at Joomla 5 → 6What you will see
- Class "JFilterInput" not found
- Class 'JFilterInput' not found
- Failed to open stream: JFilterInput
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 JFilterInput for Joomla\CMS\Filter\InputFilter.
Joomla 3
Remove or stop calling this
JFilterInput::getInstance();
// or new JFilterInput()Joomla 4 / 6
Use this instead
use Joomla\CMS\Filter\InputFilter;
// Call the namespaced class. Do not keep the J prefix.How to fix it
- 1Add a use statement for Joomla\CMS\Filter\InputFilter.
- 2Replace every JFilterInput 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
JFilterInput · Joomla\CMS\Filter\InputFilter · class alias · J prefix
JFILTEROUTPUT-CLASS-001
JFilterOutput
JFilterOutput class name
JFilterOutput 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 "JFilterOutput" not found.
JFilterOutput → Joomla\CMS\Filter\OutputFilter
Dies at Joomla 5 → 6What you will see
- Class "JFilterOutput" not found
- Class 'JFilterOutput' not found
- Failed to open stream: JFilterOutput
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 JFilterOutput for Joomla\CMS\Filter\OutputFilter.
Joomla 3
Remove or stop calling this
JFilterOutput::getInstance();
// or new JFilterOutput()Joomla 4 / 6
Use this instead
use Joomla\CMS\Filter\OutputFilter;
// Call the namespaced class. Do not keep the J prefix.How to fix it
- 1Add a use statement for Joomla\CMS\Filter\OutputFilter.
- 2Replace every JFilterOutput 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
JFilterOutput · Joomla\CMS\Filter\OutputFilter · class alias · J prefix
JINPUT-CLASS-001
JInput
JInput class name
JInput 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 "JInput" not found.
JInput → Joomla\CMS\Input\Input
Dies at Joomla 5 → 6What you will see
- Class "JInput" not found
- Class 'JInput' not found
- Failed to open stream: JInput
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 JInput for Joomla\CMS\Input\Input.
Joomla 3
Remove or stop calling this
JInput::getInstance();
// or new JInput()Joomla 4 / 6
Use this instead
use Joomla\CMS\Input\Input;
// Call the namespaced class. Do not keep the J prefix.How to fix it
- 1Add a use statement for Joomla\CMS\Input\Input.
- 2Replace every JInput 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
JInput · Joomla\CMS\Input\Input · class alias · J prefix
JINPUTCLI-CLASS-001
JInputCli
JInputCli class name
JInputCli 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 "JInputCli" not found.
JInputCli → Joomla\CMS\Input\Cli
Dies at Joomla 5 → 6What you will see
- Class "JInputCli" not found
- Class 'JInputCli' not found
- Failed to open stream: JInputCli
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 JInputCli for Joomla\CMS\Input\Cli.
Joomla 3
Remove or stop calling this
JInputCli::getInstance();
// or new JInputCli()Joomla 4 / 6
Use this instead
use Joomla\CMS\Input\Cli;
// Call the namespaced class. Do not keep the J prefix.How to fix it
- 1Add a use statement for Joomla\CMS\Input\Cli.
- 2Replace every JInputCli 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
JInputCli · Joomla\CMS\Input\Cli · class alias · J prefix
JINPUTFILES-CLASS-001
JInputFiles
JInputFiles class name
JInputFiles 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 "JInputFiles" not found.
JInputFiles → Joomla\CMS\Input\Files
Dies at Joomla 5 → 6What you will see
- Class "JInputFiles" not found
- Class 'JInputFiles' not found
- Failed to open stream: JInputFiles
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 JInputFiles for Joomla\CMS\Input\Files.
Joomla 3
Remove or stop calling this
JInputFiles::getInstance();
// or new JInputFiles()Joomla 4 / 6
Use this instead
use Joomla\CMS\Input\Files;
// Call the namespaced class. Do not keep the J prefix.How to fix it
- 1Add a use statement for Joomla\CMS\Input\Files.
- 2Replace every JInputFiles 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
JInputFiles · Joomla\CMS\Input\Files · class alias · J prefix
JINPUTJSON-CLASS-001
JInputJSON
JInputJSON class name
JInputJSON 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 "JInputJSON" not found.
JInputJSON → Joomla\CMS\Input\Json
Dies at Joomla 5 → 6What you will see
- Class "JInputJSON" not found
- Class 'JInputJSON' not found
- Failed to open stream: JInputJSON
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 JInputJSON for Joomla\CMS\Input\Json.
Joomla 3
Remove or stop calling this
JInputJSON::getInstance();
// or new JInputJSON()Joomla 4 / 6
Use this instead
use Joomla\CMS\Input\Json;
// Call the namespaced class. Do not keep the J prefix.How to fix it
- 1Add a use statement for Joomla\CMS\Input\Json.
- 2Replace every JInputJSON 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
JInputJSON · Joomla\CMS\Input\Json · class alias · J prefix · JInputJson
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 → 4What 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
- 1Get the application, then $app->getInput().
- 2Replace getVar/getInt/getCmd with Input::get() and a filter (INT, CMD, STRING).
- 3Search the whole ZIP for JRequest — every call is a Joomla 4 blocker.
Also known as
JRequest · getVar · getInt · getCmd · JRequest::get
JREQUEST-MEMBERS-001
JRequest::getInt()
JRequest::getInt / getCmd / getWord / get / set / getMethod
The entire JRequest API died with the class. People search getInt even when they already know getVar is dead.
JRequest::getInt() → $app->getInput()->get('x', 0, 'INT')
Dies at Joomla 3 → 4What you will see
- Call to undefined method JRequest::getInt
- Call to undefined method JRequest::getCmd
- Call to undefined method JRequest::getWord
- Call to undefined method JRequest::getMethod
- Call to undefined method JRequest::setVar
Symptoms people search
getInt not found · getCmd · getWord · JRequest::get(
Replace this code
Swap JRequest::getInt() for $app->getInput()->get('x', 0, 'INT').
Joomla 3
Remove or stop calling this
$id = JRequest::getInt('id');
$task = JRequest::getCmd('task');
$word = JRequest::getWord('layout');
$all = JRequest::get('post');
JRequest::setVar('id', 1);
$method = JRequest::getMethod();Joomla 4 / 6
Use this instead
$input = Factory::getApplication()->getInput();
$id = $input->getInt('id');
$task = $input->getCmd('task');
$word = $input->getWord('layout');
$post = $input->post->getArray();
$input->set('id', 1);
$method = $input->getMethod();How to fix it
- 1Same as JRequest::getVar: use Input.
- 2Map getInt→getInt, getCmd→getCmd, getWord→getWord.
Also known as
getInt · getCmd · getWord · getFloat · getBool · getString · setVar · getMethod · JRequest::get