WordPress.org

Make WordPress Core

Opened 12 years ago

Closed 12 years ago

#8309 closed defect (bug) (fixed)

Thumbnails are not removed when main picture is deleted

Reported by: sekundek Owned by:
Milestone: 2.7 Priority: high
Severity: major Version: 2.7
Component: Administration Keywords: has-patch tested commit
Focuses: Cc:

Description

When media file (photo for example) is removed from media library, the main file is removed from disk, but resized images is left behind.

Attachments (1)

8309.1.diff (1.6 KB) - added by jacobsantos 12 years ago.
Use path_join() function for fix.

Download all attachments as: .zip

Change History (9)

#1 @jacobsantos
12 years ago

  • Priority changed from normal to high
  • Severity changed from normal to major

#2 @jacobsantos
12 years ago

  • Keywords needs-patch added

Needs to be confirmed first.

#3 @jacobsantos
12 years ago

Actually, I think that this might be related to the _attachment_metadata being screwed up. Try uploading a new photo and try removing it.

#4 @jacobsantos
12 years ago

  • Summary changed from thumbnails is not removed to Thumbnails are not removed when main picture is deleted

#5 @DD32
12 years ago

Confirmed under latest trunk, I'll dig down into the code unless you want to do it Jacob?

@jacobsantos
12 years ago

Use path_join() function for fix.

#6 @jacobsantos
12 years ago

  • Keywords has-patch needs-testing added; needs-patch removed

Patch added, needs testing.

#7 @DD32
12 years ago

  • Keywords tested commit added; needs-testing removed

#8 @westi
12 years ago

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

(In [9846]) Ensure that thumbnails are removed when the media file is deleted. Fixes #8309 props jacobsantos.

Note: See TracTickets for help on using tickets.