Make WordPress Core

Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#22750 closed defect (bug) (fixed)

Track and ignore destroyed attachments

Reported by: koopersmith's profile koopersmith Owned by: nacin's profile nacin
Milestone: 3.5 Priority: normal
Severity: normal Version: 3.5
Component: Media Keywords: has-patch commit
Focuses: Cc:


Currently, queries can be chained to the point where a destroyed attachment can re-enter the workflow. That is bad.

To test this, go to featured image. Upload an image, then select and delete it. It should disappear.

Attachments (2)

22750.diff (1.1 KB) - added by koopersmith 11 years ago.
22750.2.diff (1.6 KB) - added by koopersmith 11 years ago.

Download all attachments as: .zip

Change History (6)

11 years ago

#1 @lessbloat
11 years ago

+1 to 22750.diff. Works for me.

11 years ago

#2 @koopersmith
11 years ago

Account for options.wait, and make compatible with old ajax actions (allowing delete-post to actually work).

#3 @nacin
11 years ago

  • Owner set to nacin
  • Resolution set to fixed
  • Status changed from new to closed

In 23057:

Media models: Trac and ignore deleted attachments.

Treat an admin-ajax response of 1 as successful for backwards compatibility with existing handlers.

props koopersmith. fixes #22750.

#4 @nacin
11 years ago

In 23058:

Admin ajax: Roll back new-style error sending in set-post-thumbnail. The JS handlers know to parse an unrecognized response (like -1 or 0) as a failure. see #21776. see #22750.

Note: See TracTickets for help on using tickets.