SQL errors generated if comment module is never installed
| Project: | Notify |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | minor |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
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.
| Attachment | Size |
|---|---|
| comment_installed_check.patch | 1.06 KB |

#1
This patch worked for me.
#2
Looks good. Committed. Thanks!
#3
#4
Automatically closed -- issue fixed for 2 weeks with no activity.