Closed (fixed)
Project:
OG Forum
Version:
5.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
26 Jul 2007 at 17:09 UTC
Updated:
28 Aug 2007 at 23:19 UTC
Anonymous users on Drupal receive this error when using OG Forums. There are public and OG forums on the site but anonymous users receive this on the public forums as well.
user 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 'SELECT x.tid FROM (SELECT ogt.tid FROM pit_og_term ogt INNER JO query: SELECT DISTINCT(t.tid), t.*, parent FROM pit_term_data t INNER JOIN pit_term_hierarchy h ON t.tid = h.tid WHERE (t.tid NOT IN (SELECT x.tid FROM (SELECT ogt.tid FROM pit_og_term ogt INNER JOIN pit_og_uid ogu ON ogt.nid = ogu.nid AND ogu.uid != 0) x WHERE x.tid NOT IN (SELECT ogt.tid FROM pit_og_term ogt INNER JOIN pit_og_uid ogu ON ogt.nid = ogu.nid AND ogu.uid = 0)) AND t.tid NOT IN (SELECT ogt.tid FROM pit_og_term ogt INNER JOIN pit_og_uid ogu ON ogt.nid = ogu.nid AND ogu.uid = 0 WHERE ogu.is_active = 0)) AND ( t.vid = 3 ) ORDER BY weight, name in /htdocs/drupal/includes/database.mysql.inc on line 172.
If I turn the OG Forum module off, this issue disappears.
Comments
Comment #1
rconstantine commentedHmm, seems I overlooked the anonymous case. They should not be able to go to group forums, but I think there's another issue open regarding that. I'll be taking care of the remaining issues in the next couple of weeks.
Anyway, this is on the list of things to do. Good catch. I'll add a check for user ID and change the query if UID==0.
Comment #2
shane birley commentedThanks! If you require any further testing/help, let me know.
Comment #3
rconstantine commentedOK, I am finally getting around to finishing the official release.
Just took care of this. Anonymous users now see the site-wide forums and can post (remember to not include forum posts in audience targeting).
Even if they enter a group forum post URL directly, they cannot see it.
Comment #4
(not verified) commented