In ip.module, the ip_backlog_comments() function throws a PDO exception error, because it assumes that the table "comment" exists. However the comment table only exists if you enable the Comments module (part of core). This function should first test that Comments is enabled.

PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'comment' doesn't exist: SELECT c.cid AS cid, c.hostname AS hostname FROM {comment} c LEFT JOIN {ip_posts} i ON i.type = 'comment' AND (c.cid = i.id OR i.id IS NULL) WHERE i.id IS NULL ORDER BY c.cid DESC LIMIT 0, 50; Array ( ) in ip_backlog_comments() (line 394 of modules/contrib/ip/ip.module).

CommentFileSizeAuthor
#1 ip_assumes_comment_enabled-1930512-1.patch1.42 KBjyee

Comments

jyee’s picture

StatusFileSize
new1.42 KB

Patch attached.

zekvyrin’s picture

I noticed it on logs too..

Patches works for me as expected.

  • Commit 99c52d4 on 7.x-1.x authored by jyee, committed by GeduR:
    Issue #1930512 IP Address Manager assumes Comment module is enabled -...
gedur’s picture

Issue summary: View changes
Status: Active » Fixed

Thanks for your patch, This is already commited to dev branch.

  • Commit 99c52d4 on 7.x-1.x, 7.x-2.x authored by jyee, committed by GeduR:
    Issue #1930512 IP Address Manager assumes Comment module is enabled -...

Status: Fixed » Closed (fixed)

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