Support » Fixing WordPress » Problems with WP 2.6 loading jquery

  • Hello,

    Wondering why my jquery path is being screwed up when loaded by default.

    If I leave code as is in NextGen Gallery then it loads as follows … placing the page name (images) infront of the wp-include. Which is the wrong path.

    <script type=’text/javascript’ src=’′></script>

    However, if I remove the condition in nggallery.php and force it to deregister the script and reload it, then it loads correctly.

    <script type=’text/javascript’ src=’/wp-content/plugins/nggallery/admin/js/jquery.js?ver=1.2.6′></script>

    ‘//if ($wp_version < “2.5”) {
    //if ($wp_version > “2.1.3”) wp_deregister_script(‘jquery’);
    //wp_enqueue_script(‘jquery’, NGGALLERY_URLPATH .’admin/js/jquery.js’, FALSE, ‘1.2.2’);
    if ($wp_version > “2.1.3”) wp_deregister_script(‘jquery’);
    wp_enqueue_script(‘jquery’, NGGALLERY_URLPATH .’admin/js/jquery.js’, FALSE, ‘1.2.6’);’

Viewing 1 replies (of 1 total)
  • I’m new to this so hopefully making sense 😉

    The default loading of the script is just wp_enqueue_script( ‘jquery’ ); That does not seem to setup the src properly if you have additional page structure. It doesn’t use the root domain like it should to locate the script it puts in the full path infront of the script location which makes it invalid (pointing to the wrong location).

    Is this something I have setup wrong in my config/settings?

Viewing 1 replies (of 1 total)
  • The topic ‘Problems with WP 2.6 loading jquery’ is closed to new replies.