-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Notice: Undefined index: id in ... /components/com_content/helpers/legacyrouter.php on line 97 since Joomla 3.7 #15823
Comments
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/15823. |
The bug is totally unrelated to FLEXIcontent It is a known joomla bug, The com_content (legacy) router under some cases (the view variable matches, etc) tries to "examine" menu items that belong to other components !! In the end these menu items are not selected but in the middle of the code they are examined as if they are com_content menu items Quick solution: disable error reporting in global config you do not need / should not enable it in a live site See a long discussion here A bug that should have been fixed when that PR was still good |
And to make it clear, it is always not a harmless bug, if a menu item of different component is found that has a matching number in the id then it will be selected, to be used for creating a com_content URL using a menu item of different component |
@piotr-cz - yes, this little fix stop notices from appearing in ErrorLog. Thanks. This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/15823. |
Closed as there is a PR for testing |
I accidentally caused this error to display on my own site when I copied the url of an existing page on my site and used it in a menu item of type URL. I published the menu item and I removed the symptom. |
I use Joomla 3.8.3 and I have the same problem. The problem appeared when I created many menu items of the type "Menu Item Alias" that point to other menu items of the type "Articles » Single Article". I managed to fix the problem by changing the line 95 in "components\com_content\helpers\legacyrouter.php" from: if ($menuItem !== null to: if ($menuItem !== null Actually I added the line: It seems that they forgot to check the existence of the variable $menuItem->query['view']. This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/15823. |
@impressionestudio There is a closed PR #18757 to fix this. Please provide exact steps/instructions on how to reproduce it in v3.8.3 so that it can be tested/merged. Thanks. |
Steps to reproduce the issue
Install or update Joomla! to version 3.7
Expected result
Everything is fine
Actual result
A lot of Notice: Undefined index: id in ... /components/com_content/helpers/legacyrouter.php on line 97 strings in server ErrorLog
If Notice frontend reporting is not disabled they fill site pages as well, like here - http://www.degtyarsk.ru/component/content/featured.html?start=180
System information (as much as possible)
Ubuntu 16.04, Apache 2.4.18, php 7.0.15, MySQL 5.7.18
Personally i use Flexicontent 3.1.1 but i still have this problem
Additional comments
I made some search over internet and it looks that this problem is fairly common - https://duckduckgo.com/?q=com_content%2Fhelpers%2Flegacyrouter.php+on+line+97&t=midori&ia=web
All sites showing this problem have README.txt with Joomla 3.7 version. They dont seem to use Flexi so i think problem within Joomla itself.
The text was updated successfully, but these errors were encountered: