Make WordPress Core

Opened 14 years ago

Closed 14 years ago

#15622 closed defect (bug) (fixed)

nav-menu loading before jquery-ui-sortable

Reported by: xertoz's profile Xertoz Owned by:
Milestone: 3.1 Priority: normal
Severity: blocker Version: 3.0.2
Component: Menus Keywords:
Focuses: Cc:


For some reason it seems my installation uses the .sortable() function of jquery-ui-sortable in nav-menu before it is loaded while accessing the WP built-in menu manager. This means the menu manager is rendered completely useless.

The produced error is:
a.menuList.sortable is not a function
Line 157

There's an easy solution to it, which is to wrap the (function(b){/*code*/})(); of nav-menu into jQuery(window).ready(function(){(function(b){/*code*/})(););

Attaching proposed solution.

Attachments (3)

nav-menu.js (15.1 KB) - added by Xertoz 14 years ago.
Proposed solution for #15622
nav-menu.patch.js (42.1 KB) - added by Xertoz 14 years ago.
Fixed with discussed jQuery.ready
15622.diff (693 bytes) - added by ryan 14 years ago.

Download all attachments as: .zip

Change History (8)

14 years ago

Proposed solution for #15622

#1 @ocean90
14 years ago

  • Severity changed from blocker to normal

Please upload only a patch and use

#2 @nacin
14 years ago

  • Cc koopersmith added
  • Milestone changed from Awaiting Review to 3.1
  • Severity changed from normal to blocker

This remains an issue we need to solve before release. It affects us in a number of areas.

Issue: Our dependencies as they relate to jquery-ui-* are too complex for our script loader.

Cause: Many jquery-ui-* packages aren't included in the load-scripts payload.

Effect: This, and other issues.

14 years ago

Fixed with discussed jQuery.ready

14 years ago

#3 @ryan
14 years ago

3.0 also seems to load nav-menu before jquery-ui-sortable. nav-menu has no dependencies declared. Does 15622.diff help?

#4 @Xertoz
14 years ago

15622.diff solves the problem although the line numbers misalign with my version of the file.

#5 @ryan
14 years ago

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

(In [16752]) Add jquery-ui-sortable dependency to nav-menu. fixes #15622

Note: See TracTickets for help on using tickets.