Support » Networking WordPress » HTTP error when an editor tries to load image

  • I’m running Multisite 3.6 currently and am getting an HTTP error when I try to upload a featured image in to a custom post type using an editor role. There are many factors involved in this installation, so I’ll try to give the best description of my site as well as what I’ve done to troubleshoot it already.

    First off, the problem began when I was running 3.52, it originally worked okay, but about a month ago all I could get was the HTTP error. I have editor roles attached to each individual site, and they have limited access. I’ve used the Admin Menu Editor Pro plugin to do this. Basically I the editors should only have access to two different post types, and only one type has a featured image. It should also be noted that there are around 130 sites involved in this installation, and that this problem appears to show up in every role except for Administrator.

    When I try to upload, it takes me to the regular post upload box, but the Media Library section is empty even though there are images on the site. I can go to the Upload section and choose a file, but then I get the “HTTP error” print out on the right side of the popup box.

    In any case, I made a copy of the site on another server, updated WordPress, updated the theme and updated all of the out of date plugins. I wanted to test all of this out before I did it to the live site anyway. Everything was fine with the updates, but still this problem persisted.

    Then I disabled all of the plugins, including the Admin Menu plugin hoping something would change. Still, persisted.

    In the functions file I added the capability of ‘upload_file’ to the editor role thinking it might be a permissions problem. Still I get an error, but this time I get “An error occurred in the upload. Please try again later.” as the error instead of the more generic “HTTP error”

    I’ve also run the WP_DEBUG option in the config file and found nothing but a Notice having to do with has_cap being depreciated. I’m not sure where this is used, but since it’s only a notice I don’t think it’s what’s causing the problem either.

    I’m kind of at a loss as to what could be causing this. Does any one have any ideas or suggestions?

Viewing 10 replies - 1 through 10 (of 10 total)
  • Moderator Bet Hannon


    Support Team Volunteer Coordinator

    Do you know if this multisite was started with WP 3.4 or earlier? There was a switch with 3.5 in upload paths for images. Maybe that’s part of your issue?

    Moderator Bet Hannon


    Support Team Volunteer Coordinator

    Is your error like this:
    “08.11.13 TN.pdf” has failed to upload due to an error
    Unable to create directory files/2013/08. Is its parent directory writable by the server?”

    If not, can you be more specific about your error?

    This site was created in 3.5.2, and the /upload/ directory, as well as the /sites/ directory, and the directory for that individual site is set to 755.

    Originally the error I got was just:

    HTTP error in red

    , nothing but that. Now since I’ve attempted to add all capabilities to the editor I get:

    An error occurred in the upload. Please try again later. in red.

    Moderator Ipstenu (Mika Epstein)


    🏳️‍🌈 Halfelf Rogue & Plugin Review Team Rep

    This happens when the uploader ‘crashes’

    Check your /tmp folder (it may not be /tmp, depends on your server) and make sure it’s not full.

    Also check your error log and see if anything enlightening pops up.

    An update on this issue.

    It appears that the image is actually uploading, but I can’t set it as the featured image. Further more, I can’t view or select any of the images in the Media Library when I go there from the post admin page. This is true for any type of post whether page, post or custom post type.

    Also when I give the editor permission to add media, I can go through the media, and even though the selected images do add, they don’t confirm as being added.

    Hi Ipstenu, thank you for responding.

    I guess I’m not sure what you mean by “making sure my tmp isn’t full”? There are about 6 folders within that directory, they all appear to supply analytics. Most of them have minimally small sized files except for an awstats folder that has a couple of files that are a couple Mb’s each? Should I delete these?

    As far as errors, the most recent errors seem to be from when I was working on a custom tool, but that was a while ago when I was trying to figure out how to customize a plugin. The plugin has nothing to do with these custom posts and I’ve since tested with it deactivated.

    Moderator Ipstenu (Mika Epstein)


    🏳️‍🌈 Halfelf Rogue & Plugin Review Team Rep

    No don’t delete the analytics. That’s one off at the same level as public_html right?

    Ask your webhost where the /tmp folder is that PHP uses. It’s NOT the same as the temp folder in your user path.

    Figured I’d give an update on this issue.

    After many nights of scratching my head and experimenting, I finally resolved the issue.

    I’m not sure why this resolved it, but when I un-concatenated the scripts with this code in the config file

    define( 'CONCATENATE_SCRIPTS', false );

    which resolved it. I was then able to comment it out and the settings stayed. I’m guessing there was some issue with the order that the javascript files was being called.

    Moderator Ipstenu (Mika Epstein)


    🏳️‍🌈 Halfelf Rogue & Plugin Review Team Rep

    Does your server have any caching going on? Sounds like something’s breaking compression (I saw that with GooglePageSpeed before)

    You know, it’s possible. I seem to remember having issues that might have to do with caching on the server.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘HTTP error when an editor tries to load image’ is closed to new replies.