Watcher sends notifications after comment updates all the time because it mistakenly believes the author of every comment is user 0.

The error is in the _watcher_hook_comment_update() function and it is because on the $comment_author line $comment is spelled incorrectly with 3 m's both times.

I have applied multiple patches to watcher to fix bugs and add features so my line numbers will not match with the released versions so here is the simple patch in text form:

--- Base (BASE)
+++ Locally Modified (Based On LOCAL)
@@ -628,7 +628,7 @@
   if ($comment['status'] == COMMENT_PUBLISHED) {
 
     // If the comment author is anonymous, the uid field is null
-    $comment_author = user_load(array('uid' => (is_null($commment['uid']) ? 0 : $commment['uid'])));
+    $comment_author = user_load(array('uid' => (is_null($comment['uid']) ? 0 : $comment['uid'])));
 
     // If this comment was unpublished as a result of it requiring approval
     // notify the users watching the node now that it's deemed worthy to publish

Comments

mr.j’s picture

Version: 6.x-1.3 » 6.x-1.4

Same patch needed for 6.x-1.4

Ela’s picture

...watching for updates

mr.j’s picture

Status: Needs review » Reviewed & tested by the community

This fix works and it should be committed if the module is not abandoned!

mr.j’s picture

I noticed there have been some commits on this module recently so ... bump.

d.novikov’s picture

Status: Reviewed & tested by the community » Closed (fixed)

I've commited a patch from http://drupal.org/node/263117#comment-3639316, which contains a fix, and therefore I'm closing this issue.