Opened 10 years ago
Closed 10 years ago
#29891 closed defect (bug) (fixed)
Display error message when Media Library upload fails
Reported by: | aduth | Owned by: | wonderboymusic |
---|---|---|---|
Milestone: | 4.1 | Priority: | normal |
Severity: | normal | Version: | 4.1 |
Component: | Media | Keywords: | has-patch commit |
Focuses: | ui, javascript | Cc: |
Description
Currently, when an upload fails in the media library, the following message is displayed:
An error occurred in the upload. Please try again later.
Behind the scenes, more useful error messages are set into the failure response, but they're not being exposed to the user. For example, /wp-admin/includes/ms.php
returns error messages related to unavailable disk space, but only the message above is displayed.
Attached is a patch to display the error response to the user alongside the generic error message above.
Attachments (3)
Change History (9)
#2
@
10 years ago
- Keywords commit added
- Milestone changed from Awaiting Review to 4.1
- Type changed from enhancement to defect (bug)
I think that a cleaner solution (see 29891-01.patch} to this issue is to bypass calling wp_die()
if during an ajax request. By not calling wp_die()
the errors will flow through to wp_ajax_upload_attachment
where they will result in an error JSON response.
#4
@
10 years ago
- Owner set to wonderboymusic
- Resolution set to fixed
- Status changed from new to closed
In 30156:
#5
@
10 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
Let's use ! DOING_AJAX
as we do everywhere else, see 29891.2.diff.
Patch to display error response on a failed upload