Make WordPress Core

Opened 14 years ago

Closed 11 years ago

#16164 closed defect (bug) (duplicate)

"You are not allowed to delete this post." - While Deleting a Media Library Item

Reported by: hakre's profile hakre Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.1
Component: Media Keywords: has-patch dev-feedback
Focuses: Cc:

Description

While deleteing 999 media library items, the request timed out. Resending the same request triggered an error message:

You are not allowed to delete this post.

For me as a programmer, I know that those library items are technically a post, but for communicating with the user, the error message is misleading.

Attachments (1)

16164.diff (470 bytes) - added by solarissmoke 14 years ago.
Don't fall over when trying to delete a non-existent media item

Download all attachments as: .zip

Change History (10)

#1 @hakre
14 years ago

Related: #16162

#2 @hakre
14 years ago

Somewhat related: If you delete a bunch of media items of which some have been already deleted by some other thread, it will stop at the first one that is not able to delete (e.g. because it already has been deleted).

As the request was to delete a post, it could be considered successfull if that post had been already deleted. So it's possible worth to just skip (or count the number of successful deletions) and try further instead of stopping.

This might especially make sense if multiple users are making use of the backend and do some clean-up work. To more gracefully deal with (already) non-existant posts while deleting.

#3 @mikeschinkel
14 years ago

  • Cc mikeschinkel@… added

#4 @nacin
14 years ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to Future Release

As the request was to delete a post, it could be considered successfull if that post had been already deleted. So it's possible worth to just skip (or count the number of successful deletions) and try further instead of stopping.

Seems fine.

@solarissmoke
14 years ago

Don't fall over when trying to delete a non-existent media item

#5 @solarissmoke
14 years ago

  • Keywords has-patch dev-feedback added; needs-patch removed

#6 @solarissmoke
14 years ago

Actually, see the patch on #16165 which includes this as well as other improvements to bulk handling.

#7 @bpetty
13 years ago

I have posted an updated patch on #16165, which like the previous comment, includes a fix for this ticket as well.

#8 @bpetty
13 years ago

  • Cc bpetty added

#9 @nacin
11 years ago

  • Component changed from General to Media
  • Milestone Future Release deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #16165.

Note: See TracTickets for help on using tickets.