Support Forum

File Uploader with Plupload not working

OJ Omar Jordan
Omar Jordan
Member

I am not able to upload images to any posts. Every time I try, I get the following message:

“Unexpected token �”

And then the following note below the upload box:

Error 999 – Unknown server error (check image size – may be exhausting memory)

It doesn’t seem to matter what size the image –  the smallest image I tried was 50×50, 4 kb.

I’ve deactivated all WP plugins and SP plugins and did not have any success.

Is there anything else I should try?

Thank you.

40 Answers

New Answer

MP Mr Papa
Mr Papa
Member

sure looks like a js conflict… hence the js error…  have you looked at the browser console to see what, if any, js errors are being thrown?

do you have a link to site so we can take a look?

OJ Omar Jordan
Omar Jordan
Member

The only errors that are being throw are:

  1. Uncaught ReferenceError: jQuery is not defined jquery-migrate.min.js?ver=1.2.1:2
  2. GET http://insacredbalance.com/wp-content/sp-resources/forum-cache/sp-plugin-scripts-header.js?ver=24 404 (Not Found) insacredbalance.com/:49

The link is http://insacredbalance.com/

 

I get the following message when I make my attempt in Firefox:

“JSON.parse: unexpected character at line 1 column 1 of the JSON data”

MP Mr Papa
Mr Papa
Member

you have a wp theme (or plugin) that is going against the wp standards…  its loading its own versions of jquery and jquery ui instead of using the versions that come with wp…

<script type=’text/javascript’ src=’//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js’></script>
<script type=’text/javascript’ src=’//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js’></script>

and the jquery version is a bit older than the wp version…

but the real issue is just that they are different…  makes no sense that some themes and plugins continue to violate the wp desires here…  no way for other plugins to test and work with those..

so the solution is to fix the culprit to use the wp versions…

easy check for where is to try a temp switch to the defaut wp theme and see if it starts working… if so, then its the wp theme…  if not, disable all other plugins and see if working… then re-enable one by one until it breaks…

OJ Omar Jordan
Omar Jordan
Member

I changed the theme and disabled all of the plugins one by one (there are only 2) and am still not able to upload any images. The following errors came up in the console when opening any page on the forum (not when trying to upload an image):

“Uncaught ReferenceError: jQuery is not defined jquery-migrate.min.js:2
 
“Failed to load resource: the server responded with a status of 404 (Not Found) http://insacredbalance.com/wp-content/sp-resources/forum-cache/sp-plugin-scripts-header.js?ver=24
All themes and plugins are up to date. Using theme Twenty-Eleven.
 
Any thoughts?
MP Mr Papa
Mr Papa
Member

that could possibly indicate one of two things… both likely due to incorrect server permissions…

first, go to forum – options – global settings and try disabling the combined css and js caches…

if that doesnt help, then you need to check the permissions on the wp-content/sp-resources folder… typically its 0755 (dirs) and 0644 (php) but can differ from server to server and based on php flavor… fundamentally, see if it matches the permissions on wp-content… same for the uid and gid – ie ownerships…

OJ Omar Jordan
Omar Jordan
Member

Toggling the combined css and js caches did not help.

The permissions on the wp-content/sp-resources folder is 0755 (the same as the wp-content folder) but I’m not sure how to check the permissions for php. I’m also not familiar with the uid and gid and how to check / change them.

Also, I wanted to check about the error I cited in my last posted said the server could not find this file (sp-plugin-scripts-header.js?ver=24) in the forum-cache folder. Would that be the cause of the issue?

MP Mr Papa
Mr Papa
Member

more than likely permissions or ownership… the web user couldnt access the directory to open the file…

so I had you disable the combined css and js cache so accessing the file wouldnt be needed… but concern was if there was permissions/ownership issues, it would exist for more files in sp-resources…

you can check the uid/gid via ssh (ls -la) or usually in your ftp client…

OJ Omar Jordan
Omar Jordan
Member

The php permissions are 644.

I’m sorry, I have no idea what I’m looking for in regards to the uid / gid. I’ve used both Filezilla and the Dreamweaver ftp client and I just don’t know what I’m looking for. And I’m not familiar at all with ssh.

OJ Omar Jordan
Omar Jordan
Member

I was informed by the host that the ownerships are the same. 

MP Mr Papa
Mr Papa
Member

you still have fundamental errors on your site that need resolving…  you are still attempting to use the combined css and scripts caching…  but since its inaccessible to the simple press via web user, it wont work…

“NetworkError: 404 Not Found – http://insacredbalance.com/wp-content/sp-resources/forum-cache/sp-plugin-scripts-header.js?ver=24”

you might ask your host why that file does not exist.. it indicates simple press cannot see it or create it…  because of permissions…  or as mentioned earlier, disable that caching…

you also have a wp theme or plugin doing nonstandard things and violating wp desires… its loading its own jquery and jquery ui instead of the versions that come with wp…

<script type=’text/javascript’ src=’//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js’></script>
<script type=’text/javascript’ src=’//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js’></script>

that will cause issues with plugins like simple pres that expect the wp versions of those libraries to be present…

so first step is fix the incorrect loading of jquery libraries… if you can find where loaded, we can help correct…

OJ Omar Jordan
Omar Jordan
Member

The host ran a fix permission script and found no errors.

I am using a WP theme (Twenty-Eleven) and disabled all plugins and turned off the caching. Still no luck.

I re-installed the Simple Press plugin and I noticed this message:

“The plugin does not have a valid header.”

I appreciate your patience. Is there anything else you can think of?

MP Mr Papa
Mr Papa
Member

Is this in all browsers?

Is site still in state you mentioned above so we can look? Would like to see it with plugins and themes as you mentioned..

Did you disable the combined css and jv cache?

OJ Omar Jordan
Omar Jordan
Member

Yes, it is in all browsers.

I disabled the combined cache. All plugins are deactivated.

http://insacredbalance.com/