User tests: Successful: Unsuccessful:
Pull Request for Issue #25029.
Fixes undefined index notice when accessing certain pages with non-component menu item ID.
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
.
No notices.
Notice: Undefined index: option in components\com_content\views\article\view.html.php on line 245
No.
Status | New | ⇒ | Pending |
Category | ⇒ | Front End com_contact com_content com_newsfeeds com_tags |
Labels |
Added:
?
|
@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.
@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
I have tested this item
Had only tested as written in Testing Instructions.
I have tested this item
@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.
I have tested this item
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.
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, ... ).
why should anyone append a completely unrelated menu item id to the non-sef url of anything?
I see. Now we just need 1 more tester. Seems to be hard to get some in those days.
I have tested this item
Status | Pending | ⇒ | Ready to Commit |
Status "Ready To Commit".
Thank you for killing 15 bugs!
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:
?
|
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.