-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[4.0] Joomla 4 Error with Joomla\CMS\Router only for Joomla's registration page #27356
Comments
thats all? it just says error and the line - nothing else? |
Please test the nightly builds to see if this is still an issue. |
Hi Quy Really excited beta is next to release! |
without much info about the 3dp plugin "parainvite" should be hard to guess |
Hi Alikon |
The reason for this is that the parse detects com_content based on Itemid 101 and ignores com_users and registration. is not part of com_content and the error occur... The Url: Ends in:
After processParseRules in Router is called. Maybe @Hackwar can help here? The Itemid with the menu item is higher rated then the override of the url, not sure if this is expected behavior, I don't think so |
As mentioned the Itemid 101 is per default the menu item for featured articles. You see this in the 'vars' entry of the uri object. If you create a menu item for com_users this should fix your problem too but not the root of the problem. |
Hi HLeithner With regards to your reply, removing the Itemid parameter from the URL didn't help either. The registration link itself does not have a menu item attached to it, it's just using standard Joomla SEF rewrite. |
Ok I hope that @Hackwar can help here. |
Yes you're right, I just tried it and it works. I understand the bug now. Without a menu item attached to the component, the Router overrides it with the Itemid of another menu item and assumes its path. |
Please test this again. I can not replicate this right now. |
Based on comments above and the lack of response for a year I assume this is resolved? |
The issue is still there in today Joomla 4 night build. |
I looked into this again and the issue is, that after the initial parse, the active menu item is set to the default menu item. So now, when parse is called a second time on the component router, it simply looks up the active menu item and thus the default menu item is taken. That again means that the nomenu rule doesn't think it is responsible here and returns without parsing the URL. Unfortunately there is next to nothing we can do about this. While the application router actually knows that it didn't find a menu item for this URL, the component router never gets this information and without a B/C break, we can't provide this to the component router. We would have the possibility to throw quite a lot of code at this to get around this, requiring third party devs to update their routers as well if they want to get around this problem. All of this code would have to be deprecated right again as well, because we would have to fix this properly in 5.0 then. It would be a big headache for everyone. I'm against doing this. For this specific situation here, the solution would actually be far simpler. Instead of parsing the current URL again, just do Long story short: I would vote to close this issue and mark it as "Needs review for 5.0". |
At a minimum it should be documented as a known issue |
I have just updated one of my oldest web sites first created in Joomla 1.5 and updated right through to 4. However, everything is working apart from when the Smart Search renders the articles, when I click on them I get the Requested page cannot be found. JROOT/libraries/src/Router/Router.php:153 My other issue if I may post here is in administrator > Joomla Update I get this error message: https://prnt.sc/rZuXhZ7C1vDl This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/27356. |
Can you check if #42989 fixes this for you? |
#43118 is fixing this, so I'm closing the issue. |
Steps to reproduce the issue
1: Enable Joomla SEF.
2: Create a simple system plugin, and inside
onAfterRoute
add the following code:Go to any com_users link (eg. /index.php/component/users/registration)
Expected result
Display an array of URL query parameters.
Actual result
Throws an error from JROOT/libraries/src/Router/Router.php:153
System information (as much as possible)
Joomla 4 alpha12 PHP 7.3
Additional comments
The error happens only on links generated by com_users (com_content and my own extension links etc work).
It only happens when its SEF URL is used. eg
https://www.domain.com/index.php/component/users/registration?Itemid=101
Accessing the page using non-SEF URL does not trigger the error. eg
https://www.domain.com/index.php?option=com_users&view=registration&Itemid=101
works as expected.The text was updated successfully, but these errors were encountered: