Support » Alpha/Beta/RC » False uploading error

  • Resolved Ian Dunn

    (@iandunn)


    I checked out the latest from the Git repo and tried to use the Set Featured Image dialog to upload an image for a custom post type post.

    The image uploaded sucessfully, and I can see it on the file system and in the Media Library. However, I was presented with this error in the right-hand side Uploading sidebar

    Error application_delete.png An error occurred in the upload. Please try again later.

    I think there are three problems here:

    1. The error is a false-negative
    2. The error message gives no technical details about what when wrong (and therefore, how to fix it)
    3. The error message implies that the error will fix itself if the user just waits a while

    I think the error message should give specific details about the underling technical problem with the upload, so that the user knows how to fix it. It also should not imply that it will fix itself if the user just waits and tries again later.

    OS: Fedora 17
    Apache: 2.2.22
    PHP: 5.4.8
    MySQL: 5.5.28
    WordPress: 3.5-RC2-22958
    WP tweaks: WP in a subdirectory, set custom content directory location
    Browser: Firefox 16.0.2

Viewing 4 replies - 1 through 4 (of 4 total)
  • Dominik Schilling (ocean90)

    (@ocean90)

    WordPress Core Developer

    You should get the real error message in the next nightly build.

    See https://core.trac.wordpress.org/changeset/22954

    Cool, thanks. So then I guess the only problem is the false-negative.

    Dominik Schilling (ocean90)

    (@ocean90)

    WordPress Core Developer

    Sorry, just saw the WordPress version you use. 3.5-RC2-22958 includes the fix in 22954.

    So if it’s a WP related issue you should get a descriptive error message. Otherwise it’s a generic message from the uploader instance which is not really informative.

    Could you please check the response of the AJAX call?

    It looks like PHP was spitting a warning out into the AJAX response because the temporary upload directory was outside the open_basedir directive. I’ve fixed that in the vhost config and am no longer getting an error from WP.

    Even though the problem turned out to be outside of WordPress, I’m wondering if there’s a way for WP to handle this more gracefully? There are so many poorly written plugins and themes that cause all kinds of PHP warnings and notices to show up, that this might be a fairly common problem, at least on dev/staging servers where display_errors is enabled.

    Maybe the JSON block could be parsed out of the AJAX response, and the remaining output captured, stripped of HTML tags, and then appended to the generic error message?

    Here’s the response from the upload-attachment call where the file itself was sent: http://pastebin.com/9Qf97hjT

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘False uploading error’ is closed to new replies.