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
V5 File Uploader - loader button not showing up
Avatar
Gerard Thomas
Member
Free Members
sp_UserOfflineSmall Offline
Mar 21, 2012 - 1:17 am

Hi Guys,

 

I have just installed Simple-Press V5 and associated plugins.

 

The one I was really looking for is the 'File Uploader (using Plupload)', which I now have installed.

 

After fixing a jQuery issue, the loader is now showing up (though certainly nothing like the one here). Clicking the 'Upload Attachments' reveals the file types, as per the attached image below, but nothing else. There seems to be no way to activate the upload mechanism.

Any idea what gives?

You can visit the test topic here

 

uploader_issues.jpgImage Enlarger

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Mar 21, 2012 - 6:20 am

I assume you have deactivated the plugin at the moment but - not matter.

Something on your site - and I fancy t is probably the theme - is incorrectly loading jQuery from the google cdn and it is also not checking whether a proper, WP version has been loaded as it should. This results in two copies being loaded and confused javascript. This is probably the main problem. It is being loaded immediately before FancyBox so is probably being loaded from the same source.

This codex article explains why this is incorrect: http://codex.simple-press.com/.....-conflict/ - please note that at the moment you will need to log in to the codex using the same credentials as are used on this site. (We are working on that!).

I always say that the author should put this right but this rarely seems to happen so if you can find where t is being loaded we can usually advise on an easy fix.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Gerard Thomas
Member
Free Members
sp_UserOfflineSmall Offline
Mar 21, 2012 - 5:56 pm

Heyo,

 

OK, I've gone in and removed out the jQuery call from the footer (above the Fancybox call) and instead have included in the function file:

function register_jquery() {
wp_deregister_script( 'jquery' );
wp_register_script( 'jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js');  
wp_enqueue_script( 'jquery' );
}
add_action('wp_enqueue_scripts', 'register_jquery');

 

With this, the 'add reply' is working fine though the loader is behaving as before, only partially loading.

I have tried enqueue jquery call in the in the head (before the wp-head call) but this resulted in jQuery not being called at all -  clicking 'add reply' returning 'void' and Fancybox stopped working. I can though get the enqueue to fire from within the functions file. Seems I am not the only one having issues with the enqueue call in the header either.... which is always nice!

In terms of a double call, Yoast SEO is also calling jQuery but the functions script *should* deregister that.

Of note, if I use the latest jQuery CDN call as per the Wordpress Codex suggestion,

/ajax/libs/jquery/1.7.1/jquery.min.js

, it results in the same effect of clicking the 'add reply' returning 'void' (ie. not working at all), while Fancybox DOES work. Seems there is an issue with the 1.7.1 call...

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Mar 21, 2012 - 8:11 pm

Please do not use the Google cdn. SP does not support it (as we state on the system requirements) and it really is not worth the hassle causing far more problems and solving none. As discussed in this codex article - http://codex.simple-press.com/.....-conflict/ (please note you need to currently log n to the codex using the same credentials as this site)

And I believe Yoast SEO does enqueue jQuery correctly.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Gerard Thomas
Member
Free Members
sp_UserOfflineSmall Offline
Mar 22, 2012 - 12:06 am

Hi Yellow Swordfish,

OK, I have removed the CDN call, missed that bit in the article (!), and instead have hard coded the call in the functions:

function register_jquery() {
wp_deregister_script( 'jquery' );
wp_register_script( 'jquery', 'http://www.mysite.com/wp-includes/js/jquery/jquery.js');  
wp_enqueue_script( 'jquery' );
}
add_action('wp_enqueue_scripts', 'register_jquery');

 

Which results in the following being rendered in the head of the standard page:

<script type='text/javascript' src='http://www.mysite.com/wp-inclu.....?ver=3.3.1'></script>

 

To make sure, I have turned off the Yoast plugin.

Again, Fancybox using jQuery fires off with no issues but as all the cases before, in SP it results in the same effect of clicking the 'add reply' returning 'void' (ie. not working at all).

 

When I check the head on a forum page though, it seems SP has added an additional jQuery call:

<script type='text/javascript' src='http://www.mysite.com/wp-inclu.....js?ver=3.3.'></script>

<script type='text/javascript' src='http://www.mysite.com/wp-conte.....?ver=3.3.1'></script>

<script type='text/javascript' src='http://www.mysite.com/wp-conte.....?ver=3.3.1'></script>

<script type='text/javascript' src='http://www.mysite.com/wp-inclu.....ver=1.8.16'></script>

 
Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Mar 22, 2012 - 3:45 am

Just leave the code as:

function register_jquery() {
    wp_enqueue_script( 'jquery' );
}
add_action('wp_enqueue_scripts', 'register_jquery');

That is all that is needed.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Gerard Thomas
Member
Free Members
sp_UserOfflineSmall Offline
Mar 22, 2012 - 4:48 pm

Hate to say this, but no go.

I have tried this and various different versions/variations of the same call in the functions file and they all result in one of two things:

a. Either clicking the 'add reply' returns 'void' (ie. not working at all) so you can't even post a reply

Or

b. As per the first post, the 'add reply' does work and only a portion of the 'File Uploader' plugin shows, without any of the file uploading functions showing up.

 

Again, my simple test on this site to see if jQuery is being called is checking to see if Fancybox triggers on non forum pages.

 

Right now, I have option b. running so the forum is usable but as we have set this up so we can post images between the various team members, the forum is really only half useful.

 

As the 'Add reply' function, and the whole forum for that matter, is working AND half the 'File Uploader' is working, I am wondering if it's something with the plugin itself?

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Mar 22, 2012 - 6:31 pm

right now, something, likely your theme (but could be plugin), is still loading a different jquery than ships with wp... you can see it in your head tags at:

<script type='text/javascript' src='http://www.designronin.com/jquery/jquery.min.js?ver=3.3.1'></script>

and that is an old v 1.6.4 of jquery...  so likely still causing conflicts...  poorly sourcing it from its own page too...

Avatar
Gerard Thomas
Member
Free Members
sp_UserOfflineSmall Offline
Mar 22, 2012 - 6:48 pm

Ya, that's a our 'local' version of jquery.

 

Changing the path in the functions call  to the site's WP version delivers:

BUT!

With that call, outcome a. is now in effect: a. Either clicking the 'add reply' returns 'void' (ie. not working at all) so you can't even post a reply.

 

Fancybox still works but SP does not... properly.

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Mar 22, 2012 - 6:55 pm

why not just load the wp version??? confused as to why themes/plugins have a problem doing that...  its the only version that other plugins can really test with and assume will be there...

and when I just checked, its still loading that rouge copy...

you can ignore the void stuff... a javascript(void) is put in the link because the js is launched via the onclick attribute...

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