I have the latest CVS version of og and og-related modules and the latest CVS versions of Drupal.
When a user who is a member of a group clicks the 'email subscription' link in the Group notifications block, they receive the following MySQL errors:
Warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1 query: SELECT COUNT(*) FROM og og INNER JOIN node n ON og.nid = n.nid INNER JOIN node_revisions r ON r.vid = n.vid INNER JOIN users u ON n.uid = u.uid INNER JOIN og_uid ou ON ou.uid = u.uid INNER JOIN node_access na ON na.nid = og.nid WHERE (na.grant_view >= 1 AND ((na.gid = 0 AND na.realm = 'all') OR (na.gid = 0 AND na.realm = 'og_public') OR (na.gid = 0 AND na.realm = 'og_all'))) AND og.nid IN () in /var/www/includes/database.mysql.inc on line 120
Warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') ORDER BY n.nid DESC LIMIT 0, 50' at line 1 query: SELECT DISTINCT(og.nid), n.title, r.body, n.uid, u.name, og.description FROM og og INNER JOIN node n ON og.nid = n.nid INNER JOIN node_revisions r ON r.vid = n.vid INNER JOIN users u ON n.uid = u.uid INNER JOIN og_uid ou ON ou.uid = u.uid INNER JOIN node_access na ON na.nid = og.nid WHERE (na.grant_view >= 1 AND ((na.gid = 0 AND na.realm = 'all') OR (na.gid = 0 AND na.realm = 'og_public') OR (na.gid = 0 AND na.realm = 'og_all'))) AND og.nid IN () ORDER BY n.nid DESC LIMIT 0, 50 in /var/www/includes/database.mysql.inc on line 120There are no other node access modules installed - I did have TAC installed but no longer need it due to the increasing functionality available in og and have removed it, reset the node_access table and reinstalled og.
This error continues to appear.
Any ideas anyone?
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | og_13.patch | 1.26 KB | bwynants |
Comments
Comment #1
SavoryMedia commentedMy partner just got the exact same bug...and my site is supposed to go into private beta tomorrow. *bangs head on desk*
FYI: Drupal 4.7 running OG 4.7 on Dreamhost with PHP 5.1.2 and MySQL 5.0.18 (I think)...and I'm not using any other access modules, either.
Comment #2
Patrick Nelson commented@SavoryMedia -> I'm checking the collation of MySQL tables because I'm getting a number of MySQL errors. Just to compare notes, are all your tables collated for UTF8?
Comment #3
SavoryMedia commentedMost of my tables are set to "utf8_general_ci" while a few others (view_breadcrumb, aggregator2_feed, aggregator2_item, legal_accepted, legal_conditions...as well as the SUM row at the bottom of the tables list) are all "latin1_swedish_ci".
I'm a MySQL n00b...I know enough to be really dangerous...so I may not be of much help. *L*
Comment #4
cczernia commentedI'm having the same problem. However, I noticed that when I'm logged in as admin it works fine.
Comment #5
bwynants commentedthis should fix it....
Comment #6
Patrick Nelson commentedBert,
Thanks - that fixed it perfectly.
IMO, this needs to be committed to CVS.
Regards
Patrick
Comment #7
Steve Dondley commentedPatch worked for me, too.
But actually, the if statement start just before the
if (!$uid) {
line a few lines before. This error occurs for anonymous users, too.
Comment #8
moshe weitzman commentedthis has all changed in HEAD. please retest there and reopen if needed .. there doesn't seem to be much recent interest in this issue anyway.