Originally posted on the 28th of january 2013, updated with a new finding on december 2013.
UPDATE december 2013: the problem came back on 3.6 or 3.7 I dug more in the possible cause and found another possibility.
Closing PHP tags inside the functions.php file and reopening them will produce this error too…
in my case i was using it to write html as part of a function as it is easier to escape the quotes in html than php.
If after upgrading to WordPress 3.5 you cannot insert images follow this steps:
- Start by disabling all the plugins. (I know you already did it but bear with me)
Try now uploading.
If it worked then you have a problem with plugins (Go read 1 below) / If that doesn’t work, leave them disabled.
- go to your theme folder and rename the functions.php to whatever name you want.
Try uploading now…
If it worked then you have a problem with your functions (Go read 2 below)
If that doesn’t work neither and you are using a child theme make sure there is no functions.php on the parent theme folder
(if you don’t know what i am speaking about leave a comment and i will help you by email).
- Still don’t work, what do I do now ?.
This problem is mainly caused by Java Script / jQuery conflicts between core WordPress and custom code you installed in your blog for plugins or functions you got from the Internet.
The implementation of Java Script in WordPress is complicated to say the least…
Java Script is difficult to troubleshoot unless you are a JS developer and then you would not be reading this…
(Go read 3 below)
1 .- PLUGINS trouble shooting:
- You should have done this already there are plenty of posts in WP support…
- Disable all the plugins and re-enable them one by one until the uploader breaks.
- If disabling the plugins dont fix your uploader, Rename your Plugins folder and try to upload to see if that fixes it.
2 .- FUNCTIONS.PHP
- Make sure you don’t have any lines with comments in HTML mark up (Example <!– I am a HTML code comment –> )
- Make sure you open and close the PHP tags ONLY ONCE!!! in the file.
that fixed my uploader.
The reason there is not much support for this problem is because WordPress works, and the problem is coming from something you or your theme developer broke.
Lets start with some basic troubleshooting: (You have Chrome and / or Mozilla installed don’t you ? )
- First Step: Chrome; go to the home page of your WordPress blog.
Right click anywhere on the screen and on the menu that pops click on inspect element this will open a pseudo-window with information about your page source code etc…
In the bottom right of this window there is a cog (gear) icon and next to it a little red circle with a white x on it, next to that usually is a number (That lists parsing errors when your page loaded.
If you have any number next to the red circle click on it to see the detail of the error.
You can ignore any Port error: bla bla (this don’t break the uploader and is another different matter).
IGNORE: Port error: Could not establish connection. Receiving end does not exist.
If you have 404 errors listed this means that you are missing some files, this is not usually the culcript but you should try to solve those because is not good anyway.
We are interested in Java Script errors usually something like this:
If you dont see anything here do your best to keep both your blog and this Developer Tools Window visible and navigate to your wp-admin page, always keeping an eye on the errors on the other window.
Try to upload and see if you get any errors.
Usually the errors that break the uploader show in the front page and not in the back-end.
Last bit of advice:
The most common reason for this to happen is that someone is calling somewhere the jQuery libraries and WordPress calls its own tested version of jQuery, calling jQuery twice specially different versions slows down your page, and also can break the delicate balance of WordPress and the universe.
WordPress calls jQuery only when it needs it, and if you added somewhere in your theme or template a call to jQuery the uploader will break.
If none of these steps helped you fix your uploader drop a note here, I will try to check your site and give you some personal advice (time permits)
If I helped leave a comment it feeds my ego and makes me feel better