WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#11463 closed defect (bug) (fixed)

Orphaned comment metadata in DB after comment is removed

Reported by: sirzooro Owned by:
Milestone: 2.9 Priority: normal
Severity: normal Version: 2.9
Component: Comments Keywords: has-patch
Focuses: Cc:

Description

wp_delete_comment() should delete all comment medadata associated with comment.

Attachments (2)

11463.diff (1.1 KB) - added by nacin 5 years ago.
11463.2.diff (1.9 KB) - added by nacin 5 years ago.
Second patch works a bit more like wp_delete_post. Adds deleted_comment action and deletes comment after meta is deleted (that way meta hooks can react).

Download all attachments as: .zip

Change History (8)

comment:1 @nacin5 years ago

  • Keywords has-patch added; needs-patch removed

I was looking at this the other day but couldn't get around to a patch and never submitted a ticket.

@nacin5 years ago

@nacin5 years ago

Second patch works a bit more like wp_delete_post. Adds deleted_comment action and deletes comment after meta is deleted (that way meta hooks can react).

comment:2 @westi5 years ago

Second patch looks reasonable.

comment:3 @ryan5 years ago

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

(In [12428]) Delete all comment meta when deleting a comment. Props nacin. fixes #11463

comment:4 @ryan5 years ago

[12429] for 2.9.

comment:5 @ryan5 years ago

(In [12431]) Delete all comment meta when deleting a comment. Props nacin. fixes #11463 for 2.9

comment:6 @ryan5 years ago

I committed the wrong patch the first time around. Committed again with patch 2.

Note: See TracTickets for help on using tickets.