Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#8862 closed defect (bug) (worksforme)

The delete_comment action is raised twice.

Reported by: Jehan Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.7
Component: Comments Keywords: reporter-feedback needs-patch needs-testing
Focuses: Cc:



I have a hook on a delete_comment action. When I delete a comment, it works well but... twice, though my code has clearly only one add_action hook on it.

For my problem, it is fortunately not a big issue... But it is still a bug, and maybe more annoying for other people. It has been seen on the latest released version (2.7).

Change History (5)

#1 @scohoust
9 years ago

  • Cc wp@… added
  • Keywords reporter-feedback added

Sorry, what do you mean by deleted twice? Could you show/explain your code?

#2 @Denis-de-Bernardy
9 years ago

he's meaning that if you add an option that increments a counter when the delete_comment hook gets fired, it gets triggered twice.

it *could* be that both the "normal" delete action (through http post) and the ajax delete action get fired, else I really can't see how this can possibly occur.

#3 @Denis-de-Bernardy
9 years ago

it *would* get triggered twice, even. (haven't tested myself)

#4 @Denis-de-Bernardy
9 years ago

  • Keywords needs-patch needs-testing added
  • Milestone changed from 2.8 to Future Release

bumping to Future, as this can only have minor side effects.

#5 @Denis-de-Bernardy
9 years ago

  • Milestone Future Release deleted
  • Resolution set to worksforme
  • Status changed from new to closed

works fine here.

Note: See TracTickets for help on using tickets.