Support Forum

Auto update-forum not working right

46 Answers

New Answer

YS Yellow Swordfish
Yellow Swordfish
Member

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?

WO woody
woody
Member

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?

YS Yellow Swordfish
Yellow Swordfish
Member

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.

WO woody
woody
Member

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.

YS Yellow Swordfish
Yellow Swordfish
Member

You could just send him my post comments…

WO woody
woody
Member

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

WO woody
woody
Member

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’ );

YS Yellow Swordfish
Yellow Swordfish
Member

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.

WO woody
woody
Member

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

WO woody
woody
Member

Hi guys,

          After weeks of trying, i have decided to go back to phpbb (hosted on my own server). I think the plugins just don’t mix. Can i just say a huge thank you for all your help, you’ve been amazing, Simple press is the best wordpress forum software and i have tried them all.

I do believe though that wordpress isn’t the best forum platform or it would have been done by now in a bigger way.

 

All the very best for the future.

 

Woody

www.firefoods.co.uk

YS Yellow Swordfish
Yellow Swordfish
Member

Sorry it didn’t work out for you. Out of interest though, did the jigoshop people come back with a fix?

WO woody
woody
Member

Hi YS within mins of asking him he changed the code his end, i think if i had a basic wordpress blog site it would be fine, but i have a lot going on.