[wp-trac] [WordPress Trac] #7642: scriptaculous-root loads the wrong mainfile and forces loading all the time all components instead of specific component

WordPress Trac wp-trac at lists.automattic.com
Fri Aug 29 16:36:18 GMT 2008


#7642: scriptaculous-root loads the wrong mainfile and forces loading all the time
all components instead of specific component
-------------------------+--------------------------------------------------
 Reporter:  codestyling  |       Owner:  anonymous                  
     Type:  defect       |      Status:  new                        
 Priority:  high         |   Milestone:  2.6.2                      
Component:  General      |     Version:  2.6                        
 Severity:  major        |    Keywords:  scripting scriptaculous bug
-------------------------+--------------------------------------------------
 At file '''''script-loader.php''''' the following line can be found:

 {{{
 $scripts->add( 'scriptaculous-root', '/wp-
 includes/js/scriptaculous/scriptaculous.js', array('prototype'), '1.8.0');
 }}}

 It defines the Scriptaculous-root file to original one. If you only want
 to load effects.js you would address this using:

 {{{
 wp_enqueue_script('scriptaculous-effects');
 }}}

 But it behaves not as expected, it loads nevertheless all components like
 slider.js, builder.js and so on too.

 '''Solution:'''
 The definition of scriptaculous-root is wrong and should address the right
 file instead:

 {{{
 $scripts->add( 'scriptaculous-root', '/wp-includes/js/scriptaculous/wp-
 scriptaculous.js', array('prototype'), '1.8.0');
 }}}

 in other words it should be '''.../wp-scriptaculous.js''' instead of
 ''.../scriptaculous.js'' because the original file loads by default all
 components and the '''''wp-''''' version doesn't load them (opposite
 behavoir introduction by mdawaffe serveral versions ago).

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


More information about the wp-trac mailing list