Opened 11 years ago
Closed 11 years ago
#26047 closed defect (bug) (fixed)
Unable to add menu items to menus
Reported by: | butterflymedia | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 3.8 | Priority: | normal |
Severity: | major | Version: | 3.8 |
Component: | Menus | Keywords: | has-patch |
Focuses: | Cc: |
Description
Unable to add posts/pages to custom menus using Twenty Fourteen. No console error is received.
When clicking on Add to menu, nothing happens.
Attachments (1)
Change History (12)
#1
@
11 years ago
- Summary changed from Unable to add posts/pages to custom menus using Twenty Fourteen to Unable to add posts/pages to custom menus
#2
@
11 years ago
- Summary changed from Unable to add posts/pages to custom menus to Unable to add menu items to menus
#5
@
11 years ago
- Component changed from Themes to Menus
- Milestone changed from Awaiting Review to 3.8
#6
@
11 years ago
Looks to be line 169 in nav-menu.js.
Old: re = new RegExp('menu-item\\[(\[^\\]\]*)');
New: re = /menu-item\[([^]\]*)/;
#7
@
11 years ago
I actually get the error/notice on line 907 of wp-admin/includes/ajax-actions.php
:
Notice: Undefined index: menu-item in /path/wp-admin/includes/ajax-actions.php on line 907
#8
@
11 years ago
@senlin - That's appearing because the ajax call from nav-menu.js is not passing the data for $_POST['menu-item']
that is expected in ajax-actions.php.
And yep.. I mistyped earlier. Line 907 is throwing the error. :)
#10
@
11 years ago
- Keywords has-patch added; needs-patch removed
The replacement Regex was slightly off. 26047.diff contains the correct version.
Props to @rzen for the fix.
This is not just Twenty Fourteen. Tested on Twenty Thirteen and Genesis, same results. Editing title.
The text changed from "Add menu items from the column on the left." to "Drag each item into the order you prefer. Click the arrow on the right of the item to reveal additional configuration options." but there's no menu box.
Tried pages, posts, categories, links, and all the same result.