I have this D6 site (with i18n, without comments) and I was getting a lot of warning like this (once per node or link) :

User warning: Table web.node_comment_statistics doesn't exist query: SELECT last_comment_timestamp, last_comment_name, comment_count FROM node_comment_statistics WHERE nid = 19 in _db_query() (line 169 of /..../drupal/includes/database.mysqli.inc).
User warning: Table web.comments doesn't exist query: SELECT COUNT(*) FROM comments c WHERE c.nid = 19 in _db_query() (line 169 of /..../drupal/includes/database.mysqli.inc).
User warning: Table web.comments doesn't exist query: SELECT c.cid as cid, c.pid, c.nid, c.subject, c.comment, c.format, c.timestamp, c.name, c.mail, c.homepage, u.uid, u.name AS registered_name, u.signature, u.signature_format, u.picture, u.data, c.thread, c.status FROM comments c INNER JOIN users u ON c.uid = u.uid WHERE c.nid = 19 ORDER BY c.thread DESC LIMIT 0, 50 in _db_query() (line 169 of /..../drupal/includes/database.mysqli.inc).

Here's a patch against latest 6.x-dev that fixes it.

Comments

Status: Needs review » Needs work

The last submitted patch, no_comments.patch, failed testing.

hass’s picture

This patch is not correct. In D7 we are using hook_modules_disable(). In D6 we may use http://api.drupal.org/api/drupal/developer%21hooks%21install.php/function/hook_disable/6 and set the linkchecker_scan_comments variable to 0. See linkchecker_modules_disabled() for details.

hass’s picture

Version: 6.x-2.x-dev » 7.x-1.x-dev

Damn, you are right. We also need to do this for blocks in D7.

hass’s picture

Title: Lots of warnings when comment module is disabled and its table is not in database » Lots of warnings when comment/block modules are not installed
hass’s picture

Status: Needs work » Needs review
StatusFileSize
new3.11 KB

Patch for review

hass’s picture

Issue tags: +needs backport to 6.x

hass’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work
hass’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work
Issue tags: +needs backport to 6.x
hass’s picture

Status: Needs work » Needs review
StatusFileSize
new3.11 KB

Cannot repro test failures locally.

Status: Needs review » Needs work
hass’s picture

Status: Needs work » Needs review
StatusFileSize
new3.11 KB
hass’s picture

hass’s picture

Version: 7.x-1.x-dev » 6.x-2.x-dev
Status: Patch (to be ported) » Needs review
Issue tags: -needs backport to 6.x
StatusFileSize
new2.18 KB

D6 Patch attached

hass’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

Adding more error messages to better describe the issue