Support Forum

Plupload plugin breaks SimplePress with jQuery Error

JB JB
JB
Member

When the Plupload plugin is enabled on my forum, it causes a jQuery error in Simplepress that disabled some of the buttons on the site. 

The Javascript error is as follows:

Uncaught TypeError: Cannot call method 'removeClass' of undefined jquery.ui.widget.min.js:5
e.Widget._setOption jquery.ui.widget.min.js:5
a.widget._setOption jquery-ui.min.js:251
a.widget._create jquery-ui.min.js:249
b.Widget._createWidget jquery-ui.min.js:18
b.(anonymous function).(anonymous function) jquery-ui.min.js:16
(anonymous function) jquery-ui.min.js:18
v.extend.each jquery.js:2
v.fn.v.each jquery.js:2
b.fn.(anonymous function) jquery-ui.min.js:17
g.widget._create jquery.ui.plupload.js:1
(anonymous function) jquery.ui.widget.min.js:5
e.Widget._createWidget jquery.ui.widget.min.js:5
e.(anonymous function).(anonymous function) jquery.ui.widget.min.js:5
(anonymous function) jquery.ui.widget.min.js:5
v.extend.each jquery.js:2
v.fn.v.each jquery.js:2
e.fn.(anonymous function) jquery.ui.widget.min.js:5
 (anonymous function) mycolorscreen.com:773
l jquery.js:2
c.fireWith jquery.js:2
v.extend.ready jquery.js:2
A jquery.js:2

As I’ve stated in this post I thought perhaps it was related to this jQuery error, but after ensuring that the latest version of jQuery was installed, I do not think this is the case. Here is the JS that is called:

jQuery(‘#sp_file_uploader’).plupload({
runtimes : ‘html5,silverlight,flash,html4’,
url : ‘http://mycolorscreen.com/index.php?sp_ahah=plupload&sfnonce=119d7b218b&type=&fid=2’,
max_file_size : ‘10485760’,
flash_swf_url : ‘http://mycolorscreen.com/wp-content/sp-resources/forum-plugins/plupload/resources/jscript/plupload.flash.swf’,
silverlight_xap_url : ‘http://mycolorscreen.com/wp-content/sp-resources/forum-plugins/plupload/resources/jscript/plupload.silverlight.xap’,
filters : plup.filters
});
var uploader = jQuery(‘#sp_file_uploader’).plupload(‘getUploader’);
 
Disabling the Plupload plugin fixes the error on the forum, so I know it is isolated to this plugin. Thanks!

5 Answers

New Answer

YS Yellow Swordfish
Yellow Swordfish
Member

Where are your main jQuery and jQuery UI libraries being loaded from?

JB JB
JB
Member

They are all loading in the header, and all loading from the server itself.

I couldn’t paste the source, so here is a link to the header area which loads the js. 

YS Yellow Swordfish
Yellow Swordfish
Member

And… you have got TWO copies of the jQuery UI library being loaded and one of them is being loaded from the googleapis.com CDN instead of from WP (and one IS being loaded properly – probably by SP).

JB JB
JB
Member

Perfect, thanks for the help! It was the Mingle plugin loading this other jqueryui. Totally missed that. All works now. I owe you one ;)