diff --git a/core/modules/comment/src/CommentStorage.php b/core/modules/comment/src/CommentStorage.php index 6ba41bf..defb849 100644 --- a/core/modules/comment/src/CommentStorage.php +++ b/core/modules/comment/src/CommentStorage.php @@ -185,7 +185,7 @@ public function getNewCommentPageNumber($total_comments, $new_comments, ContentE $first_thread = substr($first_thread, 0, -1); // Find the number of the first comment of the first unread thread. - $count = $this->database->query('SELECT COUNT(*) FROM {comment} WHERE entity_id = :entity_id + $count = $this->database->query('SELECT COUNT(*) FROM {comment_field_data} WHERE entity_id = :entity_id AND entity_type = :entity_type AND field_name = :field_name AND status = :status AND SUBSTRING(thread, 1, (LENGTH(thread) - 1)) < :thread', array(