WordPress.org

Plugin Directory

akismet

Opened 16 months ago

Closed 4 weeks ago

#1625 closed defect (fixed)

Don't remove the filter on pre_comment_approved

Reported by: tellyworth Owned by: matt
Priority: high Severity: normal
Plugin: akismet Keywords:
Cc: solarissmoke, sunnyratilal

Description

A user writes:

In the function akismet_result_spam, there is a call to remove_filter on pre_comment_approved, which is the filter that is currently being applied. Dynamically removing a filter in this way breaks all filters that were scheduled to run after the current one. This is a known issue - see https://core.trac.wordpress.org/ticket/9968 . The result is that any plugins that had hooked filters onto pre_comment_approved to be run after Akismet, will not work.

Please see if you can fix this behaviour. You should be able to ensure the function runs only once by having a static variable instead.

Change History (3)

comment:1 solarissmoke16 months ago

  • Cc solarissmoke added

comment:2 sunnyratilal11 months ago

  • Cc sunnyratilal added

comment:3 eoigal4 weeks ago

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

Fixed from 2.6

Using a static variable to ensure only called once rather than depend on removing the filter

Note: See TracTickets for help on using tickets.