SQL errors generated if comment module is never installed

andyl56 - November 11, 2008 - 12:56
Project:Notify
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:minor
Assigned:Unassigned
Status:closed
Description

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.

AttachmentSize
comment_installed_check.patch1.06 KB

#1

jack.r.abbit - June 2, 2009 - 19:23

This patch worked for me.

#2

matt2000 - June 23, 2009 - 23:31

Looks good. Committed. Thanks!

#3

matt2000 - June 23, 2009 - 23:31
Status:needs review» fixed

#4

System Message - July 7, 2009 - 23:40
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.