Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
plugins-topic
Auto update-forum not working right
Avatar
woody
Member
Free Members
sp_UserOfflineSmall Offline
Feb 12, 2012 - 2:06 am

i disabled jigoshop and it worked ok......

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Feb 12, 2012 - 4:16 am

Hi woody

Well that's is at least god news. So we have come full circle. If we go right back to the beginning I said that you have those two bad loads of jQuery and the jQuery UI and things will only work properly when they were fixed.

This is not just important for SP but it really is important for any other plugins you may use in the future that make use of jQuery. it is important for the base WordPress as well.

so - one - the main jQuery loading we know we can fix in the theme functions file. The other (jQuery ui) is in jigoshop and at one point you or Nick did say that you were talking to the jigoshop author. Did that not get anywhere in getting this fixed up?

andy-signature.png
YELLOW
SWORDFISH
Avatar
woody
Member
Free Members
sp_UserOfflineSmall Offline
Feb 12, 2012 - 4:51 am

I spoke to him the other day, if we know what needs doing he will fix it, it would be nice for me to go back to him and say change bla bla bla.....having said that i have all the ftp details etc can i edit them?

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Feb 12, 2012 - 5:31 am

That's great. Without looking at the code I could not begin to suggest where you could change it. If the author is willing to do so then that would be excellent (and rare in my experience).

What he is doing is loading his jQuery components (definitely the 'ui' - maybe more) from the google cdn. While I realise that the WP Codex gives an example of how to do this (and I wish they would not) it is not a good idea. It is fine if the plugin doing so is the only one needing to use jQuery components but conflicts easily arise when others need to use the same libraries.

The two main problems with loading these libraries from the google cdn is (1) the version being loaded will soon get out of date with the one being supported by WordPress itself and (2) WordPress uses a special version of jQuery called 'no conflict' which alters the way that jQuery functions should be called.

The main reason that people try and load from the google cdn is the belief that it will load faster and it is true that cdn networks are set up to provide fast transfer. But, considering that the correct and up to date versions of these libraries are in your WordPress site folders and can be loaded from there really means we are just talking milliseconds here. From the users perspective there is no real difference. And loading from your site may often actually be quicker in reality.

I do not know how this plugin actually loads its scripts but the other important point is that they must be loaded using the wp_enqueue_script() function. When used properly this ensures that the same script is not loaded more than once by two plugins that both need it.

Your own site problems stem form the fact that your Wp theme is forcing a load of the main jQuery library from google (and we already know we can fix that easily) and jigoshop is loading the jQuery UI library from google. I believe that these two are not even 100% compatible with each other in some areas because of versioning. And that is another good reason to use the WP supplied versions in that we all know they WILL be compatible with the WP version and with all other plugins that use them.

So if you guy can alter his code to use wp_enqueue_script() and load the local versions things should improve.

andy-signature.png
YELLOW
SWORDFISH
Avatar
woody
Member
Free Members
sp_UserOfflineSmall Offline
Feb 12, 2012 - 5:31 am

is it just a case of asking him to disable (jQuery ui) in jigoshop?

 

Thanks for that, we must have posted at teh same time..........ill get onto him now.

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Feb 12, 2012 - 5:40 am

You could just send him my post comments...

andy-signature.png
YELLOW
SWORDFISH
Avatar
woody
Member
Free Members
sp_UserOfflineSmall Offline
Feb 12, 2012 - 5:48 am

all emailed over 🙂 i hope this works!!!!!!!!!! thanks for the in depth reply.

Avatar
woody
Member
Free Members
sp_UserOfflineSmall Offline
Feb 12, 2012 - 5:51 am

Is this ok for the theme function

if( !is_admin() ){
//wp_deregister_script( 'jquery' );
//wp_register_script( 'jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js', false, '1.6.4', false ); // load in footer - true
//wp_enqueue_script( 'jquery' );

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Feb 12, 2012 - 6:19 am

No - you need to leave that last line - wp_enqueue_script('jquery');
That;s the line we need. so just comment out the first 2.

andy-signature.png
YELLOW
SWORDFISH
Avatar
woody
Member
Free Members
sp_UserOfflineSmall Offline
Feb 12, 2012 - 6:21 am

if( !is_admin() ){
//wp_deregister_script( 'jquery' );
//wp_register_script( 'jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js', false, '1.6.4', false ); // load in footer - true
wp_enqueue_script( 'jquery' );
}

 

is that ok

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 619
Members: 17362
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10127
Posts: 79625