When adding a menu link and specifying "#" as path, two notices are generated and the validation message is incorrect:

  • Notice: Undefined index: path in menu_edit_item_validate() (line 380 of modules/menu/menu.admin.inc).
  • Notice: Undefined index: path in menu_edit_item_validate() (line 381 of modules/menu/menu.admin.inc).
  • The path '' is either invalid or you do not have access to it.

Patch attached to fix this, including a test for this edge case.

Files: 
CommentFileSizeAuthor
#7 Screen Shot 2012-03-23 at 3.05.56 PM.png66.31 KBzeropx
#5 menu-notices-1096208-5.patch1.05 KBzambrey
PASSED: [[SimpleTest]]: [MySQL] 39,946 pass(es).
[ View ]
menu-notices.patch1.04 KBmr.baileys
PASSED: [[SimpleTest]]: [MySQL] 31,599 pass(es).
[ View ]

Comments

Version:7.x-dev» 8.x-dev
Status:Needs review» Reviewed & tested by the community
Issue tags:+needs backport to D7

Looks great.

Status:Reviewed & tested by the community» Fixed

Committed and pushed to 8.x and 7.x. Thanks!

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Still experiencing this error in 7.10, which was released in Dec. Is this still in 7.x-dev ?

Version:8.x-dev» 7.x-dev
Status:Closed (fixed)» Needs review
StatusFileSize
new1.05 KB
PASSED: [[SimpleTest]]: [MySQL] 39,946 pass(es).
[ View ]

Seems like this was never commited to 7.x branch.
Attaching rerolled patch.

@zambrey I have tested and can validate the patch worked.

StatusFileSize
new66.31 KB

Forgot to attach a screen shot, here you go.

Screen Shot 2012-03-23 at 3.05.56 PM.png

Yes, this is expected behavior. The notices are gone.

#5: menu-notices-1096208-5.patch queued for re-testing.

Status:Needs review» Reviewed & tested by the community

I also tested #5. I got the same result as zeropx in #7. The patch fixes the issue by eliminating the PHP errors. Marking this as RTBC.

Status:Reviewed & tested by the community» Fixed

Status:Fixed» Closed (fixed)
Issue tags:-needs backport to D7

Automatically closed -- issue fixed for 2 weeks with no activity.