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.
Comment | File | Size | Author |
---|---|---|---|
#3 | antispam1906026.patch | 7.1 KB | abautu |
#1 | antispam1906026.patch | 7.13 KB | abautu |
Comments
Comment #1
abautu CreditAttribution: abautu commentedThis patch also fixed a minor bug in antispam_comment: $comment is an array (not object) during $op = insert/update.
Comment #3
abautu CreditAttribution: abautu commentedComment #4
apadernoI am closing this issue, since Drupal 4.x, 5.x, and 6.x are now not supported.