If the comment module is never installed, the comments table is never created resulting in a sql error. This patch makes sure the module is enabled first.

Error:
Table '***.comments' doesn't exist query: SELECT DISTINCT(c.nid), c.cid, c.subject, c.name FROM comments c INNER JOIN node n ON c.nid = n.nid INNER JOIN node_access na ON na.nid = c.nid WHERE (na.grant_view >= 1 AND ((na.gid = 0 AND na.realm = 'all') OR (na.gid = 2 AND na.realm = 'nodeaccess_rid') OR (na.gid = 7 AND na.realm = 'nodeaccess_rid') OR (na.gid = 53 AND na.realm = 'nodeaccess_uid') OR (na.gid = 53 AND na.realm = 'nodeaccess_author'))) AND ( c.status = 0 AND c.timestamp > 1226314817 AND c.timestamp <= 1226404825 AND (n.type = 'book' OR n.type = 'page' OR n.type = 'story') )ORDER BY c.nid, c.timestamp in ***/sites/all/modules/notify/notify.module on line 385.

CommentFileSizeAuthor
comment_installed_check.patch1.06 KBastoltz

Comments

jack.r.abbit’s picture

This patch worked for me.

matt2000’s picture

Looks good. Committed. Thanks!

matt2000’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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