WordPress.org

Ready to get started?Download WordPress

Forums

jquery-ui-tabs is not loading in back-end (4 posts)

  1. Brian Hogg
    Member
    Posted 2 years ago #

    Hi,

    I'm testing my plugin on a site with a fair amount of other plugins, and it seems something is preventing jquery-ui-tabs from loading with my plugin configuration screen. I was careful not to load any of our scripts on pages other than the actual plugin pages, but perhaps another plugin was not so generous. I'll isolate the plugin or configuration problem that may be causing the issue, but would like to find a way to handle the condition from within my plugin code.

    I am loading the script while loading our own custom JS using:

    wp_register_script( 'weever.js', plugins_url( 'static/js/weever.js', __FILE__ ), array( 'jquery', 'jquery-ui-core', 'jquery-ui-tabs', 'jquery-ui-sortable' ) );

    Looking at a working site, this line is included, and a similar line is included on the non-working site also:

    <script type='text/javascript' src='http://site-url.com/wp-admin/load-scripts.php?c=0&load=jquery,utils,jquery-ui-core,jquery-ui-widget,jquery-ui-tabs,jquery-ui-mouse,jquery-ui-sortable&ver=eec808eb1be80cb714c9ea934f51b73a'></script>

    I also tried enqueuing the script explicitly with:

    wp_enqueue_script( 'jquery-ui-tabs' );

    with no effect. This error is still received:

    Uncaught TypeError: Object #<Object> has no method 'tabs'

    on line:

    jQuery( "#tabs" ).tabs();

    any thoughts as to why the script is being blocked from loading? Obviously I do not want to start loading my own version of the jquery-ui-tabs separately.

    Thanks!

  2. Brian Hogg
    Member
    Posted 2 years ago #

    Turns out an old plugin on the site is forcing jquery 1.4.2 to load (whereas WordPress 3.2.1 appears to ship with 1.6.1). This is then block jquery-ui-tabs from loading properly.

    Seems this is probably a problem one would encounter fairly often on older sites with older plugins, is there any way to force the WordPress version to load first within the plugin, or is editing the other plugin the only reliable option?

  3. aeboi80
    Member
    Posted 2 years ago #

    Did you ever find a solution?

  4. vloo
    Member
    Posted 1 year ago #

    Just to let you know, that after updating to WP 3.4.2 my Tabbed Widget plugin blew with

    Uncaught TypeError: Object #<an Object> has no method 'tabs'

    and actually wp_enqueue_script( 'jquery-ui-tabs' ); helped me :)

Topic Closed

This topic has been closed to new replies.

About this Topic