Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
If a user tries to add content (a node) with User Stats enabled and the core Comment module disabled, you will see an error similar to this:
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'MYSITE.comment' doesn't exist: SELECT COUNT(*) FROM {comment} c INNER JOIN {node} n ON c.nid = n.nid WHERE c.uid = :uid AND c.status = 1 AND n.status = 1; Array ( [:uid] => 1 ) in user_stats_post_count_update() (line 958 of /sites/default/modules/user_stats/user_stats.module).
Patch attached resolves this error, although there may be a better solution.
Comment | File | Size | Author |
---|---|---|---|
user_stats-comment_module.patch | 650 bytes | star-szr |
Comments
Comment #1
Liam McDermott CreditAttribution: Liam McDermott commentedThank you very much for reporting this and posting a patch. Sorry it's taking so to get this fixed.
I'm just marking this a duplicate of a -- much older -- issue: #955478: User Stats has undocumented dependency on comment.module.
Comment #2
star-szrThanks, missed that one.
Comment #2.0
star-szrUpdated issue summary.