Hi there.
I am probably just missing it, but I couldn't find any sort of documentation for this module. I'm sure I'm just doing something wrong and could use a hand.
I have set up a forum structure with containers. The containers have forums underneath them. The forums contain posts (not many - just one or two to test things).
I would like to control access to the containers and have that apply to all the forums underneath.
I've already set up roles:
anonymous
authenticated
member
officer
I have containers set up like:
Lobby (for all users to read/write)
-General forum
-Doc forum
Public (for anonymous users to read, but not post - must be authenticated to post)
-General forum
-Off Topic forum
-Other stuff
Members (for members and officers only to read/write - must be authenticated AND a member or an officer to post)
-General forum
-Member stuff
-Whatever
Officers (for officers only to read/write - must be authenticated AND an officer to post)
-General forum
-Private stuff
-Problems
-Whatever
I've changed/simplified the names so you get the idea.
I set up permissions so that the containers appeared to be hidden/visible for the right roles. That worked.
I made a post as an Officer in the Docs forum in the Lobby container. The post is only visible under Recent posts (from the nav menu). The "Last post" column when I go to list the forums shows that I made the post, BUT the "Topics" and "Posts" columns show a 0 in each. If I click on "Doc forum", I do not see my post. The only way I can get to my post is to click "Recent posts" from the nav menu.
If I disable forum_access module, the post shows up as expected and the "Topics" and "Posts" columns show a 1 as expected. Unfortunately, the containers are all once again visible to anybody and everybody.
Perhaps somebody can point me in the direction of what I am doing wrong? I did even try to Rebuild Permissions. That didn't seem to help.
System setup:
Drupal 5.1
PostgreSQL 7.4
Forum Access version = "5.x-1.6"
Modules installed:
acl
forum_access
menu_per_role
privatemsg
Is there anything else you'd need to know to look into this?
I set this to Documentation because it's probably just something I'm not doing right.
Thank you for your assistance.
-T.
Comments
Comment #1
tepetkhet commentedI found some more info in the logs that may be helpful...
I'm using a DB prefix of, let's say, my_ for my site.
pg_query(): Query failed: ERROR: operator does not exist: "unknown" && character varying HINT: No operator matches the given name and argument type(s). You may need to add explicit type casts. in /usr/local/www/htdocs/drupal/includes/database.pgsql.inc on line 125.query: SELECT acl_id from my_acl WHERE module = 'forum_access' && name = 10 in /usr/local/www/htdocs/drupal/includes/database.pgsql.inc on line 144.I saw these crop up in the logs when I tried to edit the permissions on the forum.
-T.
Comment #2
tepetkhet commentedI'm starting to think this is more of a bug than a documentation issue since I found the errors in the log.
I cannot use my site until this is fixed. I am still not sure what the problem is.
I did notice that the logs I pasted from the site were mangled, but I couldn't edit my post.
Here are the lines from my actual log file:
Any help? Please?
-T.
Comment #3
merlinofchaos commentedUnfortunately I don't believe that error is actually related. I'm trying to reproduce the error you're seeing and at the moment I can't. Am going over the code to see if I missed a possibility somewhere.
Comment #4
merlinofchaos commentedOk, I need some information from your database to try and figure this out. You need the TID of the forum and the NID of the post in question that's disappearing.
SELECT * FROM forum_access WHERE tid = enter_the_tid_here;
SELECT * FROM node_access WHERE nid = enter_the_nid_here;
Comment #5
merlinofchaos commentedOh, when you provide the info, please set this back to 'active'.
Comment #6
merlinofchaos commentedOh and the query error you noted is fixed in the 1.7 version. I may be wrong that it's not related, but it seems unlikely.
Comment #7
tepetkhet commentedOkay, I think I figured out how to get the info you need.
I am using a prefix, so I had to figure out how to get what you wanted.
Oh, and I upgraded forum_access and sure enough, I no longer see those errors.
I do, however, still see these:
Thank you.
-T.
Comment #8
merlinofchaos commentedDoh. That error appears to have caused a lot of unnecessary ACLs to be created. That's no good.
Try doing this:
TRUNCATE my_acl;
TRUNCATE my_acl_node;
TRUNCATE my_acl_user;
DELETE FROM my_node_access WHERE realm = 'acl';
That should pretty much take care of the extra ACLs that were created by that faulty query earlier. Then go back and edit the forum see what happens.
Is there more detail about that "ON" syntax error? I'm not certain where that is coming from.
Comment #9
tepetkhet commentedI did as asked. No change. Topics and Posts columns still show a 0.
I am still getting about 15 of those errors in the logs every time I go to list the forums/containers.
From my /var/log/messages:
From my Drupal site error logs:
Thank you,
-T.
Comment #10
tepetkhet commentedJust wanted to show you what my tables look like now.
I hope this helps.
Thanks,
-T.
Comment #11
salvisThe offending SQL query starting with
SELECT COUNT( DISTINCT ON (n.nid) n.nid) FROM my_node n...does not seem to come from Forum Access.
COUNT( DISTINCT ON (n.nid) n.nid)is an odd construct and should probably be changed to
COUNT( DISTINCT n.nid )Comment #12
Marandb commentedThis maybe a totally different situation but I have had a similar experience. My site was an update from 4.6.
To get the topics to hide / deny access properly I had to empty the "node_access" table. May be worth a try.
-- Marandb
Comment #13
pillarsdotnet commentedI was also getting confusing "operator does not exist" messages.
The error appears to be in the acl module, where the query:
This is producing the confusing "operator does not exist" messages.
SELECT acl_id FROM {acl} WHERE module = '%s' AND name = '%s'"needs to be changed (at least for Postgres) to:
SELECT acl_id FROM {acl} WHERE (module = '%s') AND (name = '%s')I have submitted a patch to the acl module here: http://drupal.org/node/164279
Comment #14
pillarsdotnet commentedBah. Cancel my previous. The real culprit is a "&&" that should be an "AND" because of operator precedence rules.
Issue submitted at http://drupal.org/node/171540
Comment #15
pillarsdotnet commentedFixed in latest version of forum_access code by changing "&&" (which is MySQL-specific) to "AND".
Comment #16
(not verified) commented