How do you tweak the code to correct this?

Thanks in advance!

Comments

noid’s picture

Okay, this solution worked. Looked at the comments.module and saw that function theme_comment_block() had a "WHERE n.status = 1" condition and I added this too to the live_discussions module. In line 83 just change

 // create the SQL
      $query = "SELECT c.nid, n.title, COUNT(c.nid) AS comment_count, MAX(c.timestamp) AS the_time FROM {comments} c ".
               "LEFT JOIN {node} n ON n.nid = c.nid WHERE c.status = 0 ".$select_blog." GROUP BY c.nid ORDER BY the_time DESC ".
               "LIMIT ".$commented_limit;

to

// create the SQL
      $query = "SELECT c.nid, n.title, COUNT(c.nid) AS comment_count, MAX(c.timestamp) AS the_time FROM {comments} c ".
               "LEFT JOIN {node} n ON n.nid = c.nid WHERE n.status = 1 AND c.status = 0 ".$select_blog." GROUP BY c.nid ORDER BY the_time DESC ".
               "LIMIT ".$commented_limit; 
Prometheus6’s picture

Assigned: Unassigned » Prometheus6
Status: Active » Fixed

Good catch. Thanks.

Prometheus6’s picture

Status: Fixed » Closed (fixed)