WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 3 years ago

#28235 closed defect (bug) (fixed)

No Warning for Bulk Media Deletions

Reported by: druesome Owned by: pento
Milestone: 4.6 Priority: normal
Severity: normal Version: 3.9.1
Component: Media Keywords: has-patch
Focuses: ui Cc:
PR Number:

Description (last modified by pento)

When deleting a single item in the Media Library by hovering over it and clicking the "Delete Permanently" link, a warning pops up that says "You are about to delete the selected items. 'Cancel' to stop, 'OK' to delete". However, when deleting items via Bulk Actions, no warning is given to the user.

Steps to reproduce:

  1. Go to Media Library
  2. Hover mouse over media, click "Delete Permanently" link
  3. Warning pops up
  4. Click Cancel
  5. Click on one or more checkboxes beside media
  6. Under "Bulk Actions" select form, choose "Delete Permanently"
  7. Click "Apply"

Actual:

Media is deleted permanently without warning.

Expected:

Warning to pop up prior to deleting permanently.

https://i.cloudup.com/7MiRoHoE32.PNG

Attachments (1)

prompt-on-bulk-delete-in-list-mode.diff (718 bytes) - added by southp 3 years ago.

Download all attachments as: .zip

Change History (17)

#1 follow-ups: @helen
6 years ago

You have to take so many steps to get here - is it really necessary to add another step?

#2 in reply to: ↑ 1 @dllh
6 years ago

Replying to helen:

You have to take so many steps to get here - is it really necessary to add another step?

I suppose it is a lot easier to stray click a deletion link than it is to tick boxes, select an option, and click a button. On the other hand, maybe better safe than sorry?

#3 in reply to: ↑ 1 @ericlewis
5 years ago

  • Resolution set to wontfix
  • Status changed from new to closed

Replying to helen:

You have to take so many steps to get here - is it really necessary to add another step?

I agree. The number of clicks and thought required about what you're doing is definitely enough. I'm closing this out. Regardless, thanks for the UI/UX feedback @druesome. UI team is always looking for new contributors :D

#4 @ericlewis
5 years ago

  • Focuses ui added

#5 @DrewAPicture
5 years ago

  • Milestone Awaiting Review deleted

#6 @ocean90
5 years ago

#29100 was marked as a duplicate.

This ticket was mentioned in Slack in #core by southp. View the logs.


3 years ago

#8 @southp
3 years ago

  • Resolution wontfix deleted
  • Status changed from closed to reopened

@ericlewis
Could we revisit this issue?
In my opinion, it is inconsistent since bulk deletion in the grid view does prompt a warning. It was mentioned in #29100, but didn't get much attention.

#9 @dllh
3 years ago

The case I've run into for this is unexpected but happens more frequently than you'd imagine. Users sometimes think that they can delete images from their media library without affecting the posts that use the images. This seems like a very weird conclusion to come to, but if you step back and think of it from the perspective of a user who doesn't understand how web apps work, it makes a certain bit of sense. For example, I can drag an image into Keynote or OpenOffice, and the image remains intact even if I remove it from the directory on my hard drive in which I originally stored it. The image is embedded in the document itself. This is the expectation some users have of images in WP posts. They think of the media library as a staging area more than as the bucket in which the images actually live. They reasonably enough think that once they add an image to a post, it's associated with the post and will permanently remain associated with the post.

The lack of an alert here results in data loss for these users. They see, for example, that they're near the disk quota. Since they've already published posts using these old images, they figure they can bulk delete a bunch of images to clear up space. There's nothing telling them otherwise, and they delete the images. Now the posts that referenced the images are broken, and recovering the images is difficult at best, impossible at worst, and can be a lot of work in either case.

#10 @southp
3 years ago

  • Keywords has-patch added

For what it's worth, I just attached a patch based on today's trunk version, so that we can simply apply it locally for a feeling. Sorry that I don't know how to bump up the version property of the ticket.

#11 in reply to: ↑ 1 @pento
3 years ago

  • Description modified (diff)
  • Milestone set to 4.6

Replying to helen:

You have to take so many steps to get here - is it really necessary to add another step?

Yes, I think so. For all other content, we have Trash, so deleting something can be undone. With the Customiser, we allow people to see what their change will look like before they commit to it, so it's an informed decision.

With Attachments, deleting is simple to do, and irreversible. Short of a Trash-like system for Attachments, I think it's appropriate for people to be warned of the permanent nature of what they're about to do.

#12 @pento
3 years ago

  • Description modified (diff)

This ticket was mentioned in Slack in #feature-shinyupdates by swissspidy. View the logs.


3 years ago

#14 @pento
3 years ago

  • Description modified (diff)
  • Owner set to pento
  • Status changed from reopened to accepted

#15 @pento
3 years ago

  • Description modified (diff)

#16 @pento
3 years ago

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

In 37859:

Media: Prompt when deleting multiple items from the Media Library

We prompt when deleting a single item from the Media Library, but not when deleting multiple items. This inconsistency is now rectified.

Props southp.
Fixes #28235.

Note: See TracTickets for help on using tickets.