Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#11463 closed defect (bug) (fixed)

Orphaned comment metadata in DB after comment is removed

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

Description

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

Attachments (2)

11463.diff (1.1 KB) - added by nacin 3 years ago.
11463.2.diff (1.9 KB) - added by nacin 3 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)

  • 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.

nacin3 years ago

nacin3 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).

Second patch looks reasonable.

comment:3   ryan3 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   ryan3 years ago

[12429] for 2.9.

comment:5   ryan3 years ago

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

comment:6   ryan3 years ago

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

Note: See TracTickets for help on using tickets.