Media Upload/Attach issue – solutions
-
Hi, I’m writing this to share my solution to resolve the issue that I had with media upload, in particular not being able to “attach” images in any post. I searched a lot, and it seems like there’s no clear one solution to this issue. In other words, there are multiple reasons might be involved, and also solutions vary. This is one of them which I have not seen from any other posts or blogs yet. This solution might be effective for those who write some their own code in child theme.
The symptoms I had with this issue were:
- an endless loading animation on my Media Upload popup window that you get when you click “Add Media” button in Edit Post page with no images showing up
- get an error message of “An error occurred in the upload. Please try again later.” on the right side of the Media Upload popup window when I attempt to upload an image instead of searching through the no-show list, but somehow the image was successfully uploaded in the media library.
- get an error message of “An error has occurred. Please reload the page and try again.” on the Find Posts or Pages popup window from Media Library page when I attempt to “attach” the image to a post which happened to be successfully uploaded above.
After searching and searching, what I did finally was…
- to check https://www.put-your-domain-name.here/xmlrpc.php (thanks to fosca from Media Insert into post/page not working)
- the page is not an error, but I found that there’s another line of code that I inserted manually in my function.php above “XML-RPC server accepts POST requests only.”
- I deleted the code in my function.php, and it just solved my problem right away!
The code I inserted was a variable that I tried to send to my javascript. (from Efficient way to Pass variables from PHP to JavaScript) Since I still need that trick, I just removed my code from function.php and placed it on another php pages I need. I guess as long as you avoid using function.php, it would work.
Other many solutions I found that might be also helpful if anyone wants to know other ways.
- How to Fix Image Upload Issue in WordPress
- How to fix WordPress HTTP Error while uploading media?
- HTTP Error when uploading images in WordPress – no thumbnail
- [resolved] An error occurred in the upload. Please try again later. 4.0.1.
Hope this helps!
- The topic ‘Media Upload/Attach issue – solutions’ is closed to new replies.