SEF-ROUTER-001
Joomla 3 router + system SEF plugin hacks
index.php?option= SEF assumptions / plg_system_sef
Joomla 4 rebuilt SEF. Plugins that rewrite query strings the J3 way break menus, multilingual, and API routes.
Joomla 3 router + system SEF plugin hacks → Component RouterView + rules
Symptoms people search
404 after upgrade · SEF urls broken · index.php? still showing
Replace this code
Swap Joomla 3 router + system SEF plugin hacks for Component RouterView + rules.
Joomla 3
Remove or stop calling this
// Parse $_SERVER['REQUEST_URI'] by exploding index.php?option=com_lms&view=course&id=Joomla 4 / 6
Use this instead
Implement RouterView / RouterViewConfiguration for com_lms. Do not str_replace on index.php? in a system plugin.How to fix it
- 1Write a component router.
- 2Retest menu items and language associations.
Also known as
plg_system_sef · RouterView · SEF 404
There is no 1:1 swap for this one. The architecture changed. If you cannot rewrite it, Infyways can.
Related issues
- Joomla 3 → 4Joomla API
JRequest::getVar() and the whole JRequest API
JRequest::getVar() → $app->getInput()->get('id')
- Joomla 3 → 4Joomla API
JError / JException
JError::raiseError() → throw new RuntimeException() / try-catch
- Joomla 3 → 4Joomla API
isAdmin() / isSite()
$app->isAdmin() → $app->isClient('administrator') / isClient('site')
- Joomla 3 → 4Joomla API
Factory::getUri()
JFactory::getUri() → Uri::getInstance()
- Joomla 3 → 4Joomla API
Factory::getXml() / JXMLElement
JFactory::getXML() → SimpleXMLElement
- Joomla 3 → 4Joomla API
Factory::getEditor()
JFactory::getEditor() → Editor::getInstance()