giles14
Forum Replies Created
-
@zurka. Happy to hear that ^^
As you may noticed in the previous message(in post #1873204) the answer was something like yours:
Deregister the conflictive library you don’t need to enqueue any other library, since nexgen gallery load it’s own by default.
Btw, to use this fix, please remove the previous fix(If you’ve made it) in script-loader.php, I mean remove /* */ tags.
Sorry for the delay on release this but I was making all the tests to ensure that this will solve only the problem and will not cause any side effect. This is totally safe and it will not make any change to the WordPress core, it will ONLY prevent (in nextGen gallery admin page) the load of the conflictive script.
IMPORTANT: This fix is only for the 1.7.2 version.
Here is the fix (completely tested).
There are to ways:
Download the admin.php file from here:
https://bit.ly/h6gqdeReplace it to: your-wordpress-site/wp-content/plugins/nextgen-gallery/admin/ (instead of replacing you can rename the original file to admin.php.bak and put the downloaded file there.)
That’s it now you can use the album feature.
The second way is to add yourself the fixed lines (if you don’t trust in my admin.php file):
Use FTP, Go to your-wordpress-site/wp-content/plugins/nextgen-gallery/admin/ download admin.php and open it in your favorite editor (Notepad, dreamweaver..).
Go to line 350, after this line:
wp_register_script('ngg-ajax', NGGALLERY_URLPATH . 'admin/js/ngg.ajax.js', array('jquery'), '1.4.1');
Add this:
//Fix the jQuery ui script conflict, this is not included in Alex Rabe original code, this was added by Carlos Giles. //Should be deleted when WordPress 3.1 is installed. wp_deregister_script('jquery-ui-sortable');
I highly recommended to keep the comment lines to track the modification if you want to remove it later.
After you modify the file, Should look like this:
wp_register_script('ngg-ajax', NGGALLERY_URLPATH . 'admin/js/ngg.ajax.js', array('jquery'), '1.4.1'); //Fix the jQuery ui script conflict, this is not in Alex Rabe code this was added by Carlos Giles. //Should be deleted when WordPress 3.1 is installed. wp_deregister_script('jquery-ui-sortable');
Upload it to the same path (replace it).
That’s it. Everything will work fine without any side effect since it only prevent the load of the conflictive javascript in nextGen gallery admin Interface.
****
I think this fix should be added in the original Alex Rabe’s plugin since it’s totally safe and fix the conflict between the jQuery ui 1.7.3 (in wordpress core) and the 1.8.x of the plugin.
@twhiting9275: I know that the author makes a lot of ajax using, but is ok since it looks nice and works (generally), I think this Bug is not Alex Rabe’s fault, since he is using the newest jQuery ui tools and WordPress don’t another thing is that on a clean installation of WP the problem doesn’t shows up (I’ve test it) that means that’s not the plugin fault.
Don’t forget this a free script and we use it “as is” is pretty difficult to program and maintain such a big plugin (thousands and thousands of code).
The 3.1 should be released within 15 days
If you want an easier and safer solution just open script-loader.php in yoursite/wp-includes/
find the line:
$scripts->add( 'jquery-ui-sortable', '/wp-includes/js/jquery/ui.sortable.js', array('jquery-ui-core'), '1.7.3' ); $scripts->add_data( 'jquery-ui-sortable', 'group', 1 );
Comment those lines using /* */ like this:
/* $scripts->add( 'jquery-ui-sortable', '/wp-includes/js/jquery/ui.sortable.js', array('jquery-ui-core'), '1.7.3' ); $scripts->add_data( 'jquery-ui-sortable', 'group', 1 ); */
Upload to your server; that’s it no need to upgrade any jQuery ui library.
Any change is reversible just remove the /* */ tags.
I’m aware of that, I’m working on how to fix this issue.
If it’s urgent to put galleries into albums, use the method above then use your backup to keep all in order.
Just let me add a conditional function to prevent to load this libraries on nextgen Gallery administration.
Hi there,
I have found a solution (at least for my case): Update the jQuery UI library on WordPress Core.
**********
IMPORTANT: If you want to try this, be sure to backup any file used here.
This is only a quick-fix the complete solution will be release at WordPress 3.1.
Use this solution at you own risk.
Pack: https://bit.ly/eAp34K
Files included in the pack:
ui.core
ui.dialog
ui.draggable
ui.droppable
ui.rezisable
ui.selectable
ui.sortable
ui.tabs
*********
Instructions:Download 1.8.7 UI Pack:
https://bit.ly/eAp34K
unpack it.
Replace the files (trough FTP) in yoursite/wp-includes/js/jQuery/ with those included in the pack. *Backup your files.Go to: yoursite/wp-includes/
Download and backup script-loader.php:
Open it with your favorite editor (dreamweaver, Notepad etc.) and look for this lines:$scripts->add( 'jquery-ui-core', '/wp-includes/js/jquery/ui.core.js', array('jquery'), '1.7.3' ); $scripts->add_data( 'jquery-ui-core', 'group', 1 ); $scripts->add( 'jquery-ui-tabs', '/wp-includes/js/jquery/ui.tabs.js', array('jquery-ui-core'), '1.7.3' ); $scripts->add_data( 'jquery-ui-tabs', 'group', 1 ); $scripts->add( 'jquery-ui-sortable', '/wp-includes/js/jquery/ui.sortable.js', array('jquery-ui-core'), '1.7.3' ); $scripts->add_data( 'jquery-ui-sortable', 'group', 1 ); $scripts->add( 'jquery-ui-draggable', '/wp-includes/js/jquery/ui.draggable.js', array('jquery-ui-core'), '1.7.3' ); $scripts->add_data( 'jquery-ui-draggable', 'group', 1 ); $scripts->add( 'jquery-ui-droppable', '/wp-includes/js/jquery/ui.droppable.js', array('jquery-ui-core'), '1.7.3' ); $scripts->add_data( 'jquery-ui-droppable', 'group', 1 ); $scripts->add( 'jquery-ui-selectable', '/wp-includes/js/jquery/ui.selectable.js', array('jquery-ui-core'), '1.7.3' ); $scripts->add_data( 'jquery-ui-selectable', 'group', 1 ); $scripts->add( 'jquery-ui-resizable', '/wp-includes/js/jquery/ui.resizable.js', array('jquery-ui-core'), '1.7.3' ); $scripts->add_data( 'jquery-ui-resizable', 'group', 1 ); $scripts->add( 'jquery-ui-dialog', '/wp-includes/js/jquery/ui.dialog.js', array('jquery-ui-resizable', 'jquery-ui-draggable'), '1.7.3' ); $scripts->add_data( 'jquery-ui-dialog', 'group', 1 );
Reaplace all ‘1.7.3’ with ‘1.8.7’.
Save the file and upload it to your server (to the same path).
Done, now you can add galleries to albums.
I hope this fix your problem.
If I use the query-ui-1.8.6.min.js library, WordPress will Call:
<script type=’text/javascript’ src=’https://accesototalpuebla.com/accesototal/wp-content/plugins/nextgen-gallery/admin/js/jquery-ui-1.8.6.min.js?ver=3.0.4′></script>@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', 'https://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=’https://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=’https://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).
Do you want the image to redirects you to the gallery where it comes from?