User tests: Successful: Unsuccessful:
Pull Request for Issue #12558.
Components may break in some case if accessed using an URL like http://localhost/joomla/en/index.php?option=com_contact. The reason is that due to some faulty routing the request parameters from the default menu item are added. This is likely at least a view parameter (eg "view=article"). Now since the original request didn't specify a view and expected the default view of the component to be executed. But that view parameter from the menu item now becomes active and since that view doesn't exist in the requested component it blows up in an error page.
The language filter plugin removes the language tag from the JUri path during its parseRule method. This is needed so further processing of the routing doesn't work from a wrong menu path, for the homepage, this path should be empty.
Now with that specific request, the index.php ends up in the path, making it non-empty. The further routing parsing now wrongly assumes this is part of the SEF URL and comes to wrong conclusions in the end.
This PR empties the $parts array before setting it to the JUri->path if index.php is the only part left in that array.
http://localhost/joomla/en/?option=com_contact (adjust to your testing site). This Link should work and give you the contacts categories view.http://localhost/joomla/en/index.php?option=com_contact (note the index.php part). This Link should not work and give you a "View not found [name, type, prefix]: article, html, contactView" error page.None
| Status | New | ⇒ | Pending |
| Labels |
Added:
?
|
||
| Category | ⇒ | Front End Plugins |
I have tested this item
| Status | Pending | ⇒ | Ready to Commit |
RTC. Thanks @Bakual
| Labels |
Added:
?
|
||
| Status | Ready to Commit | ⇒ | Fixed in Code Base |
| Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-10-29 09:38:56 |
| Closed_By | ⇒ | rdeutz |
| Labels |
Removed:
?
|
||
I have tested this item✅ successfully on d6b764e
Tested on legacy site. Solves the issue described using similar urls with and without index.php.
Tested remaining of site and did not remark any unwanted consequences
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/12600.