? Pending
Referenced as Not before: # 17323

User tests: Successful: Unsuccessful:

avatar csthomas
csthomas
13 Nov 2017

Other solution for the same problem as in #17323, #18043

Summary of Changes

Do not add view name to the menu lookup array if the view does not exists.

Remove PHP Notice:
Notice: Undefined index: loginx in .../libraries/src/Component/Router/Rules/MenuRules.php on line 216

Notice: Trying to get property of non-object in .../libraries/src/Component/Router/Rules/MenuRules.php on line 216

Testing Instructions

  1. Install joomla.

  2. Go to backend and edit a menu item.

  3. Change name of view in the link field and save.
    Please see attached video. I used FF Inspector (Ctrl + Shift + C)
    menu_check_view_name2

  4. Go to frontend in order to see changes.

  5. Before PR there are 2 php notices, after PR they disappear.

Expected result

No PHP Notices

Actual result

PHP Notices.

Documentation Changes Required

No

avatar csthomas csthomas - open - 13 Nov 2017
avatar csthomas csthomas - change - 13 Nov 2017
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 13 Nov 2017
Category Libraries
avatar csthomas
csthomas - comment - 13 Nov 2017

Anyone who has tested this PR can login at https://issues.joomla.org/tracker/joomla-cms/18564 and mark the test as successful.

avatar ciar4n ciar4n - test_item - 13 Nov 2017 - Tested successfully
avatar ciar4n
ciar4n - comment - 13 Nov 2017

I have tested this item successfully on 16c361c

Both PHP errors gone with PR.


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

avatar Quy
Quy - comment - 14 Nov 2017

In your video, after clicking the Save button, the Menu Item Type is blank. Is that right?

avatar csthomas
csthomas - comment - 14 Nov 2017

Yes, view loginx has never exist.
View sectionexisted in older joomla version but you will get the same result, blank menu type.

I do not have other idea how to test old menu item that currently does not exists.

This is only a example (a way) to create a menu item that for now does not exist, like with view section.

After you create invalid menu item, means with view that is invalid then you get php notices - on front end - before PR.

avatar FPerisa FPerisa - test_item - 15 Nov 2017 - Tested successfully
avatar FPerisa
FPerisa - comment - 15 Nov 2017

I have tested this item successfully on 16c361c

Tested like in the instructions. Nice gif btw!


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

avatar franz-wohlkoenig franz-wohlkoenig - change - 15 Nov 2017
Status Pending Ready to Commit
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 15 Nov 2017

RTC after two successful tests.

avatar mbabker mbabker - change - 18 Nov 2017
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2017-11-18 15:11:06
Closed_By mbabker
Labels Added: ?
avatar mbabker mbabker - close - 18 Nov 2017
avatar mbabker mbabker - merge - 18 Nov 2017

Add a Comment

Login with GitHub to post a comment