Active
Project:
Spaces
Version:
6.x-3.0
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
29 Dec 2010 at 09:04 UTC
Updated:
5 Sep 2012 at 19:34 UTC
In spaces_og.module, the following SQL statement is attempted:
db_query("UPDATE {og_access_post} og_p
INNER JOIN {og_ancestry} og_a ON og_p.nid = og_a.nid
INNER JOIN {node} n ON og_p.nid = n.nid
SET og_public = %d WHERE og_a.group_nid = %d",
!$private, $node->nid);
That is a mysql-ism, (virtually) no other database supports that -- in particular, Postgres chokes on it. You have to replace it with an update on the table where the condition is set by a subselect, for example (sticking rather close to the original query; the subselect could be simplified by dropping a join):
db_query("UPDATE {og_access_post} SET og_public = %d
WHERE nid in (
SELECT og_p.nid FROM {og_access_post} og_p
INNER JOIN {og_ancestry} og_a ON og_p.nid = og_a.nid
INNER JOIN {node} n ON og_p.nid = n.nid
WHERE og_a.group_nid = %d)",
!$private, $node->nid);
Patch attached.
| Comment | File | Size | Author |
|---|---|---|---|
| spaces_og.module.diff | 1.69 KB | bartl |
Comments
Comment #1
liam morland