Make WordPress Core

Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#20658 closed defect (bug) (fixed)

Thumbnails are not removed when the main image is deleted

Reported by: sergeybiryukov's profile SergeyBiryukov Owned by: ryan's profile ryan
Milestone: 3.4 Priority: normal
Severity: major Version: 3.4
Component: Media Keywords: has-patch
Focuses: Cc:

Description

wp_delete_attachment() relies on attachment metadata when removing intermediate images:
http://core.trac.wordpress.org/browser/tags/3.3.1/wp-includes/post.php#L3820

Since [20435], the metadata is no longer accessible (deleted from both database and cache) at that point.

Attachments (1)

20658.patch (1.2 KB) - added by SergeyBiryukov 13 years ago.

Download all attachments as: .zip

Change History (4)

#1 @ryan
13 years ago

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

In [20770]:

Collect intermediate images before deleting an attachment and its meta. Fixes thumbnail deletion. Props SergeyBiryukov. fixes #20658

#2 follow-up: @nacin
13 years ago

Should we double-check the rest of [20435]?

#3 in reply to: ↑ 2 @SergeyBiryukov
13 years ago

Replying to nacin:

Should we double-check the rest of [20435]?

The rest seems fine.

Note: See TracTickets for help on using tickets.