? ? Pending

User tests: Successful: Unsuccessful:

avatar SharkyKZ
SharkyKZ
8 Aug 2019

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

Notice: Undefined index: option in components\com_content\views\article\view.html.php on line 245

Documentation Changes Required

No.

avatar SharkyKZ SharkyKZ - open - 8 Aug 2019
avatar SharkyKZ SharkyKZ - change - 8 Aug 2019
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 8 Aug 2019
Category Front End com_contact com_content com_newsfeeds com_tags
avatar SharkyKZ SharkyKZ - change - 8 Aug 2019
Labels Added: ?
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 9 Aug 2019

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.

avatar franz-wohlkoenig franz-wohlkoenig - test_item - 9 Aug 2019 - Tested successfully
avatar SharkyKZ SharkyKZ - change - 9 Aug 2019
The description was changed
avatar SharkyKZ SharkyKZ - edited - 9 Aug 2019
avatar richard67
richard67 - comment - 9 Aug 2019

@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.

avatar richard67
richard67 - comment - 9 Aug 2019

@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?

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 9 Aug 2019

@richard67 its enough to test one of the Menutypes as @SharkyKZ wrote "or".

avatar richard67
richard67 - comment - 9 Aug 2019

@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 👅

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 9 Aug 2019

I have tested this item 🔴 unsuccessfully on 1c52418

Had only tested as written in Testing Instructions.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/25796.
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 9 Aug 2019

I have tested this item 🔴 unsuccessfully on 1c52418


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/25796.

avatar franz-wohlkoenig franz-wohlkoenig - test_item - 9 Aug 2019 - Tested unsuccessfully
avatar richard67
richard67 - comment - 9 Aug 2019

@franz-wohlkoenig And he forgot to mention com_contact in his list.

avatar richard67
richard67 - comment - 9 Aug 2019

@franz-wohlkoenig Why unsuccessfully? You found a mistake? If no, please change to "not tested". If yes, please describe the mistake.

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 9 Aug 2019

I have not tested this item.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/25796.

avatar franz-wohlkoenig franz-wohlkoenig - test_item - 9 Aug 2019 - Not tested
avatar richard67
richard67 - comment - 9 Aug 2019

I have tested this item successfully on 1c52418

Tested contact, content, newsfeeds components (each the single item and the category views) and tags view of tags component.

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.

avatar richard67 richard67 - test_item - 9 Aug 2019 - Tested successfully
avatar richard67
richard67 - comment - 9 Aug 2019

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, ... ).

avatar Quy
Quy - comment - 9 Aug 2019

why should anyone append a completely unrelated menu item id to the non-sef url of anything?

#22973 (comment)

avatar richard67
richard67 - comment - 10 Aug 2019

I see. Now we just need 1 more tester. Seems to be hard to get some in those days.

avatar alikon
alikon - comment - 11 Aug 2019

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.

avatar alikon alikon - test_item - 11 Aug 2019 - Tested successfully
avatar franz-wohlkoenig franz-wohlkoenig - change - 11 Aug 2019
Status Pending Ready to Commit
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 11 Aug 2019

Status "Ready To Commit".

avatar HLeithner
HLeithner - comment - 23 Aug 2019

Thank you for killing 15 bugs!

avatar HLeithner HLeithner - change - 23 Aug 2019
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2019-08-23 15:57:08
Closed_By HLeithner
Labels Added: ?
avatar HLeithner HLeithner - close - 23 Aug 2019
avatar HLeithner HLeithner - merge - 23 Aug 2019

Add a Comment

Login with GitHub to post a comment