-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[4.3] fix for #40182 : Router error in NomenuRules #40184
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
Conversation
Testing Instructions
Actual result BEFORE applying this Pull RequestYou get fatal error: ERROR 0 - Call to a member function getInput() on null in ...\libraries\src\Component\Router\Rules\NomenuRules.php:82 Expected result AFTER applying this Pull RequestNo error. The article is being displayed properly. |
|
Oh, No. You are making more changes than needed. All you need to do is change line 82 from: $input = $this->app->getInput();To $input = $this->router->app->getInput(); |
|
No, bug has been introduced by #39029 |
|
Just updating line 82 causes line 83 crash : ERROR 0 - Object of type Joomla\CMS\Input\Input is not callable..... |
|
Line 83 crash because you also made change to that line. If you just make change to line 82 as I mentioned, it will work well |
No, original line 83 contains if ($view->parent_key && $input->get($view->parent_key)) { If I use your line, it crashes as $input is a method and not an object. |
|
Lines 83 to 85 have been updated to be consistent with pr #39029 |
$input is an object. Not method. Like 82, if you make change as mentioned, will return application input object $input = $this->router->app->getInput();
|
|
I tried PR as we discussed :
|
|
Your code does not work. I applied the changes (which I know it's wrong) and see some notices and 404 not found error: Notice Notice |
|
I just tried following your testing instructions and, indeed, your single line works. |
|
I have tested this item ✅ successfully on 6c948fa This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/40184. |
|
For information, hidden components behave like no-menu components |
|
I have tested this item ✅ successfully on 6c948fa This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/40184. |
|
RTC This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/40184. |
|
Thank you @conseilgouz for the fix! |
Pull Request for Issue #40182 .
Summary of Changes
In version 4.2.9, $this->router->app is being used instead of $this->app.
Testing Instructions
Use Joomla 4.3 nightly build
Create at least one article
Create an instance of Articles - Latest module
Change Home menu item to link to Featured Contacts menu item type. If you have any menu items link to com_content before, please unpublish it or make them 'hidden'
Try to access to an article from Articles - Latest module above
Actual result BEFORE applying this Pull Request
ERROR 0 - Call to a member function getInput() on null in ...\libraries\src\Component\Router\Rules\NomenuRules.php:82
Expected result AFTER applying this Pull Request
No error