Opened 15 years ago
Closed 15 years ago
#18723 closed defect (bug) (fixed)
Image Editing does not handle failures gracefully
| Reported by: | westi | Owned by: | azaozz |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.3 |
| Component: | Media | Version: | 3.2 |
| Severity: | major | Keywords: | needs-patch |
| Cc: | Focuses: |
Description
The Image Editing tools in the admin do not handle failures gracefully.
For example if loading an image / rotating and image fails and returns a failure instead of an image you end up with a spinning wheel of failure.
To reproduce:
- Upload an image
- Choose to edit it to get to the crop, rotate, resize options.
- Edit 'stream_preview_image' in 'wp-admin/includes/image-edit.php' to always return false.
- Now try an rotation. Notice the spinner never stops spinning.
This is because the javascript doesn't register an 'error' handler on the img but only a load handler so when WP fails to return an image we don't handle the error gracefully.
Change History (2)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
We need at least something like:
img.error( function() { alert( 'Sorry, something went wrong.' ); t.toggleEditor(postid, 0); } )in
refreshEditor