• Brian Hogg

    (@brianhogg)


    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='https://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!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Brian Hogg

    (@brianhogg)

    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?

    Did you ever find a solution?

    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 ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘jquery-ui-tabs is not loading in back-end’ is closed to new replies.