WordPress.org

Make WordPress Core

Opened 11 years ago

Closed 11 years ago

#13249 closed defect (bug) (fixed)

Menu item parent property

Reported by: filosofo Owned by: filosofo
Milestone: 3.0 Priority: normal
Severity: major Version: 3.0
Component: Menus Keywords: has-patch
Focuses: Cc:

Description (last modified by filosofo)

Currently, the hierarchy of menu items works haphazardly: a menu item's parent is determined by its post_parent property, which is the database ID of the item's original object.

This introduces a number of bugs because menu item original objects can be either taxonomy objects or post objects, each group of which has its own independent set of database IDs. So try to order a mixture of taxonomy menu items and post type menu items, and you get inconsistent (sometimes non-functional) results.

Patch introduces the menu item property menu_item_parent, which determines the hierarchical placement of the given menu item. menu_item_parent refers to the menu item DB ID of its parent, if any, which is internally consistent because all menu item objects are post objects.

Attachments (1)

menu_item_parent.13249.diff (7.8 KB) - added by filosofo 11 years ago.

Download all attachments as: .zip

Change History (8)

#1 @filosofo
11 years ago

  • Description modified (diff)

#2 @filosofo
11 years ago

  • Description modified (diff)

#3 @duck_
11 years ago

Related: #13037

#4 @nacin
11 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [14450]) Non-JS menu ordering fixes, also parent handling fixes. props filosofo, fixes #13135, fixes #13249

#5 @dickie
11 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

I'm not sure if this is the fix that broke it, up to the point that this was checked in the menu were working OK, but it is now not possible to save menu items as children. You can physically move them, but once saved the hierarchy is lost.
(Note this is with Javascript ENABLED.)

#6 @filosofo
11 years ago

dickie, please see #13256 and re-up.

#7 @filosofo
11 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed
Note: See TracTickets for help on using tickets.