Make WordPress Core

Opened 16 years ago

Closed 13 years ago

#16164 closed defect (bug) (duplicate)

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

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

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 16 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
16 years ago

Related: #16162

#2 @hakre
16 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
16 years ago

  • Cc mikeschinkel@… added

#4 @nacin
16 years ago

  • Keywords needs-patch added
  • Milestone Awaiting Review → 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
16 years ago

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

#5 @solarissmoke
16 years ago

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

#6 @solarissmoke
16 years ago

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

#7 @bpetty
14 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
14 years ago

  • Cc bpetty added

#9 @nacin
13 years ago

  • Component General → Media
  • Milestone Future Release
  • Resolution → duplicate
  • Status new → closed

Duplicate of #16165.

Note: See TracTickets for help on using tickets.