Undefined index with non-component menu item#25796
Undefined index with non-component menu item#25796HLeithner merged 4 commits intojoomla:stagingfrom SharkyKZ:j3/undefinedIndex
Conversation
|
I have tested this item ✅ successfully on 1c52418 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/25796. |
|
@dioubernardo Could you test if this solves your issue #25029 ? Just apply the changes made with this PR and see if it helps. You should do this not on your production site but on a copy (files and db) you can use for testing. When ok, please mark your test result in the issue tracker here https://issues.joomla.org/tracker/joomla-cms/25796 by using the "Test this" button, then selecting the result and submitt. It would be good for us to know if this PR here solves your specific issue. |
|
@SharkyKZ I started with testing, com_content article and category blog are ok. But I just ask myself why should anyone append a completely unrelated menu item id to the non-sef url of anything? |
|
@richard67 its enough to test one of the Menutypes as @SharkyKZ wrote "or". |
|
@franz-wohlkoenig No. He changed code for different components, and (theoretically) with every change could happen a typo, so as a good JBS member I should test all changes 👅 |
|
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/25796. |
|
@franz-wohlkoenig And he forgot to mention com_contact in his list. |
|
@franz-wohlkoenig Why unsuccessfully? You found a mistake? If no, please change to "not tested". If yes, please describe the mistake. |
|
I have not tested this item. This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/25796. |
|
I have tested this item ✅ successfully on 1c52418 I still don't understand what it is good for to append an unrelated menu item ID, and the breadcrumps having the e.g. URL menu item at beginning of the path seems strange to me, but better that than a PHP notice shown at frontend. This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/25796. |
|
Hint for testers: Easiest way is to use sample testing data, it countains already all menu item and content types needed. Copy the links from backend menu item edit view of the particular menu item (contact categroy, single contact, content category, single article, news feeds, ... ) to a frontend page. You can use several broswer tabs, one for each of menu item. Then append to every link the "&Itemid=xxx". I used 448 for xxx, that is the menu item id of the URL menu item type for the link to the admin page on a new clean installation of staging + testing sample data. Goto the modified URL and you see the PHP notice. Now apply the patch e.g. with patchtester and reload every browser tab. You will see no notice and the right view for the particular menu item (contact categroy, single contact, ... ). |
|
|
I see. Now we just need 1 more tester. Seems to be hard to get some in those days. |
|
I have tested this item ✅ successfully on 1c52418 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/25796. |
|
Status "Ready To Commit". |
|
Thank you for killing 15 bugs! |
Pull Request for Issue #25029.
Summary of Changes
Fixes undefined index notice when accessing certain pages with non-component menu item ID.
Testing Instructions
Create External URL or other non-component menu item.
Remember its ID.
Enter, article, article category, newsfeeds, newsfeed category or tags page via non-SEF URL, e.g.
index.php?option=com_content&view=article&id=1.Append menu item ID of external URL menu item, e.g.
index.php?option=com_content&view=article&id=1&Itemid=488.Expected result
No notices.
Actual result
Documentation Changes Required
No.