[wp-trac] [WordPress Trac] #23816: wp_enqueue_script|style() dependency failures are silent

WordPress Trac noreply at wordpress.org
Tue Mar 19 13:00:01 UTC 2013


#23816: wp_enqueue_script|style() dependency failures are silent
-------------------------+------------------------------
 Reporter:  johnbillion  |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  low          |   Milestone:  Awaiting Review
Component:  General      |     Version:
 Severity:  normal       |  Resolution:
 Keywords:               |
-------------------------+------------------------------

Comment (by SergeyBiryukov):

 > Actual result: 'my-script' gets enqueued

 Could not reproduce that. My steps:
 1. Created an empty `js/my-script.js` file in Twenty Thirteen child theme.
 2. Added this to child theme's `functions.php`:
 {{{
 function twentythirteen_my_scripts() {
         wp_enqueue_script(
                 'my-script',
                 get_stylesheet_directory_uri() . '/js/my-script.js',
                 array( 'script-that-does-not-exist' )
         );
 }
 add_action( 'wp_enqueue_scripts', 'twentythirteen_my_scripts' );
 }}}
 3. The script was not enqueued.
 4. Once I replaced `'script-that-does-not-exist'` with `'jquery'`, the
 script was enqueued.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/23816#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list