WordPress.org

Make WordPress Core

Opened 11 years ago

Closed 6 years ago

#16820 closed defect (bug) (fixed)

Browser uploader in media library shows no error information

Reported by: solarissmoke Owned by: wonderboymusic
Milestone: 4.4 Priority: normal
Severity: minor Version: 3.1
Component: Upload Keywords: has-patch
Focuses: Cc:

Description

In wp-admin/media-new.php, if you use the browser uploader, you get no information about errors.

For example if the file you upload is too large, you just get redirected to the media library with the message "Error saving media attachment." Not very helpful - and also inconsistent - because if you do exactly the same thing using the pop-up image editor (i.e., select "Add an Image" from the Upload/Insert menu while editing a post), then you do get useful error information.

I propose that if there are errors, the user should not be redirected to the Media Library. Instead Wordpress should wp_die telling them what went wrong.

Attachments (2)

16820.diff (1020 bytes) - added by solarissmoke 11 years ago.
With browser uploader, don't redirect back to media library and instead tell the user what went wrong.
16820.2.diff (632 bytes) - added by solarissmoke 8 years ago.

Download all attachments as: .zip

Change History (11)

#1 @solarissmoke
11 years ago

  • Keywords has-patch added
  • Severity changed from normal to minor

@solarissmoke
11 years ago

With browser uploader, don't redirect back to media library and instead tell the user what went wrong.

#2 @solarissmoke
11 years ago

  • Keywords dev-feedback added

Patch is a bit messy, but it tells the user what happened when something went wrong with the rowser uploader.

#3 @dd32
8 years ago

  • Keywords needs-refresh added; dev-feedback removed

Confirmed that this is still an issue, when for example, you attempt to upload a too large a file.

Patch no longer applies.

@solarissmoke
8 years ago

#4 @solarissmoke
8 years ago

  • Keywords needs-refresh removed

Patch refreshed.

#5 @chriscct7
6 years ago

  • Keywords needs-testing added

#6 @antpb
6 years ago

  • Keywords needs-testing removed

Tested with success. This is all around a much better experience. I received the "Error saving media attachment." after a redirect to the media library page when hitting upload with no file selected.

#7 @chriscct7
6 years ago

  • Milestone changed from Awaiting Review to 4.4
  • Owner set to chriscct7
  • Status changed from new to reviewing

#8 @wonderboymusic
6 years ago

  • Owner changed from chriscct7 to wonderboymusic
  • Status changed from reviewing to accepted

#9 @wonderboymusic
6 years ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 34002:

media-new.php, when using the browser uploader, if the result of uploading is a WP_Error - wp_die() with the error, instead of redirecting with a generic error.

Props solarissmoke.
Fixes #16820.

Note: See TracTickets for help on using tickets.