WordPress.org

Ready to get started?Download WordPress

Forums

HTTP error when an editor tries to load image (11 posts)

  1. NTrost
    Member
    Posted 1 year ago #

    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?

  2. Bet Hannon
    Member
    Posted 1 year ago #

    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?

  3. Bet Hannon
    Member
    Posted 1 year ago #

    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?

  4. NTrost
    Member
    Posted 1 year ago #

    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.

  5. 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.

  6. NTrost
    Member
    Posted 1 year ago #

    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.

  7. NTrost
    Member
    Posted 1 year ago #

    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.

  8. 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.

  9. NTrost
    Member
    Posted 1 year ago #

    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.

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

  11. NTrost
    Member
    Posted 1 year ago #

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

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.