Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
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.
Comment | File | Size | Author |
---|---|---|---|
#7 | Screen Shot 2012-03-23 at 3.05.56 PM.png | 66.31 KB | zeropx |
#5 | menu-notices-1096208-5.patch | 1.05 KB | zambrey |
menu-notices.patch | 1.04 KB | mr.baileys | |
Comments
Comment #1
catchLooks great.
Comment #2
webchickCommitted and pushed to 8.x and 7.x. Thanks!
Comment #4
grasmash CreditAttribution: grasmash commentedStill experiencing this error in 7.10, which was released in Dec. Is this still in 7.x-dev ?
Comment #5
zambrey CreditAttribution: zambrey commentedSeems like this was never commited to 7.x branch.
Attaching rerolled patch.
Comment #6
zeropx CreditAttribution: zeropx commented@zambrey I have tested and can validate the patch worked.
Comment #7
zeropx CreditAttribution: zeropx commentedForgot to attach a screen shot, here you go.
Comment #8
zambrey CreditAttribution: zambrey commentedYes, this is expected behavior. The notices are gone.
Comment #9
dcam CreditAttribution: dcam commented#5: menu-notices-1096208-5.patch queued for re-testing.
Comment #10
dcam CreditAttribution: dcam commentedI 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.
Comment #11
David_Rothstein CreditAttribution: David_Rothstein commentedCommitted to 7.x - thanks! http://drupalcode.org/project/drupal.git/commit/79c6205