WordPress.org

Ready to get started?Download WordPress

Forums

NextGEN Gallery
[resolved] Can't use Album Administration (7 posts)

  1. giles14
    Member
    Posted 3 years ago #

    Hi all,

    I have updated nextgen to 1.7.0 (now I upgrade to 1.7.2) since then I can't be able to put any galery into an album, I can't drag and drop nor minimize or maximize (hide/show the album details) I think I have trace the error (using chrome's built-in features) here it's the log:

    Uncaught TypeError: Cannot call method 'apply' of undefined
    a.widget.a.extend._triggerload-scripts.php:28
    b.Widget._createWidgetjquery-ui-1.8.6.min.js:30
    b.widget.bjquery-ui-1.8.6.min.js:28
    b.widget.bridge.b.fnjquery-ui-1.8.6.min.js:29
    c.extend.eachload-scripts.php:30
    c.fn.c.eachload-scripts.php:24
    b.widget.bridge.b.fnjquery-ui-1.8.6.min.js:29
    toggleContentadmin.php:190
    c.extend.readyload-scripts.php:26
    Lload-scripts.php:33

    Can anybody help me? With the previous version 1.6.2 everything was working fine, but now this error appears.

    Thank you in advance

    http://wordpress.org/extend/plugins/nextgen-gallery/

  2. Jason Nathan
    Member
    Posted 3 years ago #

    I think it's because jquery-ui-1.8.6.min.js might be conflicting with wordpress's internal jquery-ui call (1.7.{something}).

    If you want to load the new version, you have to deregister the internal jquery-ui and load the new one.

    See codex Function Reference/wp enqueue script for information.

    If you didn't load the script and a plugin did, try searching in the plugin files for where it is called and make sure its called the right way.

  3. Alex Rabe
    Member
    Posted 3 years ago #

  4. giles14
    Member
    Posted 3 years ago #

    @Jason, Thank you, I think you have found the problem but still I can't solve it I try to apply to add the function (to load the different jquery version) but without success, It really changes the version but not to the same one used in NextGen.

    I have tried this:

    <?php
    function my_init_method() {
        wp_deregister_script( 'jquery' );
        wp_register_script( 'jquery', 'http://accesototalpuebla.com/accesototal/wp-content/plugins/nextgen-gallery/js/jquery.cycle.all.min.js?ver=2.88');
        wp_enqueue_script( 'jquery' );
    }    
    
    add_action('init', 'my_init_method');
    ?>

    In order to load the same jquery lib, but when I refresh the website the jquery version now shows:
    The wordpress call:
    <script type='text/javascript' src='http://accesototalpuebla.com/accesototal/wp-content/plugins/nextgen-gallery/js/jquery.cycle.all.min.js?ver=3.0.4'></script>
    NextGen Call:
    <script type='text/javascript' src='http://accesototalpuebla.com/accesototal/wp-content/plugins/nextgen-gallery/admin/js/jquery-ui-1.8.6.min.js?ver=1.8.6'></script>

    @Alex, thanks for the advice, I reply in this post, because I use the solution provided by Jason, nonetheless If I fix the issue I will post overthere( I have read all replies there).

  5. giles14
    Member
    Posted 3 years ago #

    If I use the query-ui-1.8.6.min.js library, WordPress will Call:
    <script type='text/javascript' src='http://accesototalpuebla.com/accesototal/wp-content/plugins/nextgen-gallery/admin/js/jquery-ui-1.8.6.min.js?ver=3.0.4'></script>

  6. Jason Nathan
    Member
    Posted 3 years ago #

    @giles14.

    I think your problem is jQuery UI, not jQuery. jQuery will only be a problem for you if your WordPress version is outdated.

    If your current WP install loads jQuery 1.4.2 & above, you only might need to change jQuery UI related files.

    In your code:

    wp_register_script( 'jquery', 'http://accesototalpuebla.com/accesototal/wp-content/plugins/nextgen-gallery/js/jquery.cycle.all.min.js?ver=2.88');

    You are loading up jquery.cycle.all.min which is NOT jQuery. WordPress uses the internal handle 'jquery' to load the jQuery library (not any of the jQuery Plugins)

    WordPress currently uses a jQuery UI that is (I think) version 1.7.3.

    If I'm not mistaken, nextGEN requires jQuery UI 1.8.6 because it has a new auto-complete feature that is only available in jQuery UI's 1.8X versions.

    So what I think is happening is that WordPress (or a plugin you installed) might already be loading WP's internal jQuery UI 1.7.3 files which is conflicting with nextGEN's 1.8.6 version. (You can't load both versions at the same time).

    An important point to note is that de-registering jQuery UI is not as simple as wp_deregister_script('jquery-ui').

    From the best of my knowledge, WP loads individual elements (various files) of the library. You can scroll down the page (the link I posted above) to see a reference to all of WP's jquery-ui components and their handles.

    You have to check if these are used (that they are loaded up). You can do that by using Firefox with Firebug or Chrome's developer console to see what resources are loaded when the page loads.

    You also really ought to try and understand the whole codex page that I linked to earlier. That way, you'll understand what went wrong with your code above.

    The only reason I think it might be jQuery UI is because it happened to me when I was creating a plugin. I had the exact same error as you did.

    I wish you the best in debugging you code.

  7. giles14
    Member
    Posted 3 years ago #

    @Jason, I forgot to reply you. With your help I fix the issue in my blog,in order to make it work.

    In admin panel I deregister the WordPress jQuery ui library and then register the new one.

    Thank you for your help.

    If you can send me some resources to learn JavaScript will be great.

    Best Regards

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.