[wp-trac] [WordPress Trac] #19558: jQuery-ui core and others not being enqueued

WordPress Trac wp-trac at lists.automattic.com
Thu Dec 15 02:53:29 UTC 2011


#19558: jQuery-ui core and others not being enqueued
--------------------------+-----------------------------
 Reporter:  asfreema      |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  3.3
 Severity:  normal        |   Keywords:  needs-patch
--------------------------+-----------------------------
 I'm developing a theme and cannot enqueue any of the jquery-ui extensions
 (accordion, or core). I've tried multiple combinations of
 wp_enqueue_script calls. jQuery 1.7.1 loads fine, even when I only enqueue
 jquery-ui-core or jquery-ui-accordion, but those two never seem to load. I
 do have them in my wp-includes/js/jquery/ui/ folder.

 This is my functions.php which can be used to simulate the problem:
 {{{
 <?php function meso_enqueue_scripts() {
         wp_enqueue_script('jquery-ui-accordion');

 }
 add_action ( 'wp_enqueue_scripts', 'meso_enqueue_scripts');
 ?>
 }}}
 My theme does have wp_head(); You can also try out jquery-ui-core, also
 including jquery, or any combination.

 I fixed it by changing the definitions in wp-includes/script-loader.php
 that look like this:

 {{{
         $scripts->add( 'jquery-ui-core', '/wp-
 includes/js/jquery/ui/jquery.ui.core.min.js', array('jquery'), '1.8.16', 1
 );
 }}}
 To this:

 {{{
         $scripts->add( 'jquery-ui-core', '/wp-
 includes/js/jquery/ui/jquery.ui.core.min.js', array('jquery'), '1.8.16' );
 }}}


 Seems like a problem with that add method and the extra argument (jquery
 and the other libraries don't have it), but I don't know the core well
 enough to find what it is.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/19558>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list