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.

CommentFileSizeAuthor
user_stats-comment_module.patch650 bytesstar-szr
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Liam McDermott’s picture

Status: Needs review » Closed (duplicate)

Thank 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.

star-szr’s picture

Thanks, missed that one.

star-szr’s picture

Issue summary: View changes

Updated issue summary.