Closed (fixed)
Project:
Watcher
Version:
6.x-1.4
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
11 Oct 2010 at 04:15 UTC
Updated:
4 Mar 2012 at 21:55 UTC
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
Comment #1
mr.j commentedSame patch needed for 6.x-1.4
Comment #2
Ela commented...watching for updates
Comment #3
mr.j commentedThis fix works and it should be committed if the module is not abandoned!
Comment #4
mr.j commentedI noticed there have been some commits on this module recently so ... bump.
Comment #5
d.novikov commentedI've commited a patch from http://drupal.org/node/263117#comment-3639316, which contains a fix, and therefore I'm closing this issue.