We have antispam and comment_notify on a site. Antispam is higher priority than comment_notify, but because antispam uses _form_alter + #submit to check comments for spam, it runs after comment_notify. So the order of execution is:

comment_form_submit
  * ...
  * antispam_comment
  * ...
  * comment_notify
  * ...
antispam_comment_form_submit

antispam_comment hook doesn't do any spam verification. this is done by antispam_comment_form_submit.
Due to this workflow, antispam_comment_form_submit unpublishes comments after other modules processed the comment as published. In comment_notify case, that means emails are sent out (because comment is published), but imediately after the comment is unpublished.

IMHO the correct workflow would be for antispam_comment to check AND unpublish the comment so that other modules implementing hook_comment to see it unpublished.

Cheers,
Andrei.

CommentFileSizeAuthor
#3 antispam1906026.patch7.1 KBabautu
#1 antispam1906026.patch7.13 KBabautu
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

abautu’s picture

Status: Active » Needs review
FileSize
7.13 KB

This patch also fixed a minor bug in antispam_comment: $comment is an array (not object) during $op = insert/update.

Status: Needs review » Needs work

The last submitted patch, antispam1906026.patch, failed testing.

abautu’s picture

Status: Needs work » Needs review
FileSize
7.1 KB
apaderno’s picture

Version: 6.x-1.3 » 6.x-1.x-dev
Issue summary: View changes
Status: Needs review » Closed (outdated)

I am closing this issue, since Drupal 4.x, 5.x, and 6.x are now not supported.