Ticket #15622 (closed defect (bug): fixed)

Opened 18 months ago

Last modified 18 months ago

nav-menu loading before jquery-ui-sortable

Reported by: Xertoz Owned by:
Priority: normal Milestone: 3.1
Component: Menus Version: 3.0.2
Severity: blocker Keywords:
Cc: koopersmith

Description

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 /wp-admin/load-scripts.php?c=1&load=jquery,utils,nav-menu&ver=2b05c108d9016a4caa470b8edaf40953 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

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

Change History

Proposed solution for #15622

  • Severity changed from blocker to normal

Please upload only a patch and use nav-menu.dev.js.

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

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.

Fixed nav-menu.dev.js with discussed jQuery.ready

ryan18 months ago

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

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

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

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

Note: See TracTickets for help on using tickets.