Closed (fixed)
Project:
Drupal core
Component:
tracker.module
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
16 Oct 2004 at 17:56 UTC
Updated:
3 Apr 2005 at 02:17 UTC
Any comments in the approval queue, even if not approved, will still make tracker show those nodes as new. This is a big problem for busy sites where many of those comments may in fact be spam -- people check out those nodes and find that there aren't any new comments.
Comments
Comment #1
dries commentedThe queries in tracker.module do not check the comments' status. Adding 'c.status = 0' to the WHERE-clause of the SQL queries has the side effect of hiding nodes with no comments. The solution is not to join comments that are not published but I'm not sure it is ANSI SQL to use something like:
... LEFT JOIN {comments} c ON (n.nid = c.nid AND c.status = 0) ...Comment #2
kps commentedJust in case it helps, this is a query I ended up using for a very similar purpose in a custom tracker-like module:
Caveat lector; I am no SQL guru and have only run this on MySQL.
Comment #3
dries commentedCan someone test whether this works with PostgreSQL?
Comment #4
jasono commentedThis is still an issue in the CVS version. Right now, moderated comments, even once approved, never move the node's position in the tracker. I think perhaps the node_comment_statistics table isn't getting updated correctly when the comment is approved by a moderator.
Comment #5
jasono commentedAt the moment, the comment_save function in comment.module looks like this:
I think there needs to be a call to update the node_comment_statistics table, incrementing the comment count and setting the last updated timestamp either to the current time, or to the time the comment was originally posted but ONLY if this is a comment being approved. This will then correct the tracker output display.
Comment #6
moshe weitzman commentedComment #7
boris mann commentedMoshe, I'm setting this back to critical. Having those nodes marked as new is a real issue with the volume of spam most Drupal sites get. If it's been fixed, great, but if not, then I still consider it critical, since it renders the tracker (and other things, like subscription module which sends out false email, since the comment will never get published and the node isn't updated) useless.
Comment #8
Steve Dondley commentedI can't recreate this problem.