Index: modules/comment/comment.module =================================================================== RCS file: /cvs/drupal/drupal/modules/comment/comment.module,v retrieving revision 1.663 diff -u -p -r1.663 comment.module --- modules/comment/comment.module 15 Nov 2008 11:45:03 -0000 1.663 +++ modules/comment/comment.module 15 Nov 2008 15:38:04 -0000 @@ -747,7 +747,7 @@ function comment_save($edit) { if ($edit['pid'] == 0) { // This is a comment with no parent comment (depth 0): we start // by retrieving the maximum thread level. - $max = db_query('SELECT MAX(thread) FROM {comments} WHERE nid = :nid', array(':nid' => $edit['nid']))->fetchField(); + $max = db_query('SELECT MAX(thread) FROM {comments} WHERE nid = :nid and pid = 0', array(':nid' => $edit['nid']))->fetchField(); // Strip the "/" from the end of the thread. $max = rtrim($max, '/'); // Finally, build the thread field for this new comment.