Hello.
I have the following set up:
Drupal 6.6, ACL 6.x-1.0-beta2, Advanced Forum 6.x-1.0-alpha15, Forum Access 6.x-1.x-dev (2008-Nov-06), Organic groups 6.x-1.0-rc9, OG Forum 6.x-1.0-beta1, Pathauto 6.x-1.1
I have created an Organic Group and a forum connected to it.
I have two use roles: site architect, that can do a lot of stuff, and alumni member, which has permissions to create groups, access forums, create forum topics, edit and delete own topics.
I have several forums - two general, not belonging to any group, and one created from Organic Group forum.
Forum access settings for general forum is
View this forum: alumni member, site architect
Post in this forum: alumni member, site architect
Edit posts: site architect
Delete posts: site architect
The same settings are for an OG forum. OG forum belongs to a container for all group forums.
If alumni member goes to a general forum (/en/forums/general), and presses the New Topic button (which leads to /en/node/add/forum/12), then in the field "Forums", where a location of the forum topic is selected, all general forums are vsisble; all containers are visible. Group forum is not visible. (place *** for reference from bottom text)
Selecting a general forum and saving the post leads to the following good and green node_access record:
node_access entries for nodes shown on this page
node prio status realm gid view update delete explained
161 0 empty acl 0 0 0 0 3: forum_access/12
161 0 empty forum_access 1 0 0 0 anonymous user
161 0 empty forum_access 2 0 0 0 authenticated user
161 0 ok forum_access 8 1′ 0 0 alumni member
(Some of the table elements provide additional information if you hover your mouse over them.)
This user is granted view access to node 161 by one or more of the following grants (if they are present above with status 'ok'):
all: 0
og_access:og_public: 0
og_access:og_subscriber: 88, 130, 78
forum_access: 2, 8
However, if the same user goes to the group forum, and presses the "New Topic" button there, then in the "Forums" taxonomy field only the group forum is shown, and saving the forum topic leads to this bad node_access record:
node_access entries for nodes shown on this page
node prio status realm gid view update delete explained
164 ? alien all 0 1′ 0 0 All users may view this node.
164 0 empty forum_access 1 0 0 0 anonymous user
164 0 empty forum_access 2 0 0 0 authenticated user
164 0 missing forum_access 3 1 1 1 site architect
164 0 missing forum_access 8 1 1 1 alumni member
This forum topic does not appear in the forum itself. However, it is accessible from the list of forums (it shows as a new topic in the groups forum), and it is accessible from Recent posts.
I have checked the tables - {node} and {term_node} are updated correctly (have a record with nid of this forum topic), {acl_node} and {forum} do not have corresponding record.
If alumni member presses the "Edit" button for this topic, then in the "Forums" taxonomy field only general forums and containers are shown (as in place *** above). The group forum is not shown.
If a user with "site architect" role presses the "Edit" button, then in the "Forums" taxonomy field all the forums are shown, and simply saving this forum topic without any changes leads to clean and nice node_access record:
node_access entries for nodes shown on this page
node prio status realm gid view update delete explained
164 0 empty acl 0 0 0 0 46: forum_access/17
164 0 empty forum_access 1 0 0 0 anonymous user
164 0 empty forum_access 2 0 0 0 authenticated user
164 0 ok forum_access 3 1 1 1 site architect
164 0 ok forum_access 8 1′ 0 0 alumni member
(Some of the table elements provide additional information if you hover your mouse over them.)
This user is granted view access to node 164 by one or more of the following grants (if they are present above with status 'ok'):
all: 0
og_access:og_public: 0
og_access:og_subscriber: 88, 130, 78
forum_access: 2, 8
Also tables {acl_node} and {forum} receive necessary records about this node.
I suspect there is something wrong happening when the list of taxonomy terms is created for the "Forum" taxonomy selector for a user with 'alumni member' role. I'm quite new to Drupal, so I do not know how to test or debug this moment... Maybe this even not belongs to "Forum access" module.
By the way, if alumni member uses "Create content" menu, and creates forum topic from there (using link /en/node/add/forum), in the "Forum" taxonomy selector all the necessary forums are shown (general and a group forum), and saving forum topic from here works correctly.
Could you please suggest how to make the "New topic" button work correctly (or how to find & debug the relevant code)?
Regards,
Danila
Comments
Comment #1
DanilaD commentedI have found that if I add a code like this
to the 'view' portion of forum_nodeapi in forum.module, the topic appears in the Forum correctly, but the node access is still wrong. Probably I can also update {acl_node} from the same place, and it will work... I do not like this approach because it includes changing the core module, and I would like to solve the origin of the problem, not the results.
Comment #2
salvisThank you for your very detailed post!
There are several things wrong here. We can't tackle them all at once and it will probably take a while to sort it all out, but I'm very interested in pursuing this all the way to the end. Let's try and start with the most obvious issue:
forum.module builds the drop-down list content with all forums, and FA (and presumably og_forum) reduce that list to hide those that the user shouldn't be seeing.
As a first step, try rebuilding permissions (admin/content/node-settings) and report whether/how the DNA output has changed for the two nodes. (This is to "secure the evidence".)
Then try disabling FA and check whether the group forum is still missing. If it is, then we'll need to visit the og_forum issues queue for that part. Drupal will probably ask you to rebuild permissions again, and this will change what you see in DNA.
forum_nodeapi('view') is certainly not the right place for inserting records in {forum}, but it's an interesting test. 'view' is done for every node when it's being displayed on the site, so this may have inadvertently added nodes to forums that shouldn't be there...
Also, can you disable adv_forum while we try to sort this out? After all, adv_forum is still at the alpha stage, and the less actors we have to deal with, the better. Does pathauto play any role in this or can you disable it for now?
Comment #3
DanilaD commentedHello.
First, I create a post in group forum (it becomes node 165). In the drop-down box only group forum is available. After save, node_access is red and bad as in issue description above.
Then I go to general forum, and create topic from there. Group forum is still not in the drop-down list. After save, node_access is good and green as in issue description.
After permissions are rebuilt, both posts node_access become good and green. For general forum they stay the same as specified above; for group forum they change also to a good condition (already printed above, will repeat for reference):
Nevertheless, node 165 does not show in forum topic list at en/forums/group-forums/test-group-2. It is accessible in 'Last post' area at en/forums/group-forums. (I've checked again if the node_access changes because of view or because of permission rebuilt - now I'm sure rebuilding permissions sets the node_access for this node correct). Just to make sure I made a cron run - nothing changed - topics do not appear in forum.
General forum post is accessible in forum topic list for general forum.
Disabling Forum Access:
After I disabled 'Forum Access', Drupal requested to rebuild permissions. I did so.
Topics (node 165) did not appear in group forum. It's node_access now is
The same for general topic, which is visible in relevant forum.
When creating new topic from group forum, again only the group forum is available. New node (168) has the same node_access as node 165 few lines above; it does not appear in group forum. When editing it, group forum is not available in 'Forum' taxonomy selection.
Disabling Forum Access and OG Forum:
No requirement to rebuild permissions.
Now when alumni member goes to create a forum topic in group forum using "New Topic" button, all available forums are in the 'Forums' taxonomy selector. Saving the forum topic leads to topic being shown in the group forum topic list.
Editing one of the previously created topics (just open and save, no changes) makes it appear in the group forum. So the issue appears to be from OG Forum. Checking this...
Disabling only OG Forum:
After I enabled Forum Access back, it asked to rebuild permissions. Did so.
Now when alumni member uses "New topic" button in group forum, in the 'Forum' taxonomy selector he can see general forum, group forum container and the group forum itself (in addition, other group forums to which he can also post are shown there).
Saving the topic leads to good and correct permissions, also topic shows in the group forum. So the issue is inside 'OG Forum'.
Thanks for help, salvis. Should we transfer this issue to OG Forum?
Regards,
Danila
Comment #4
DanilaD commentedInstalling OG Forum - development version did not help.
6.x-1.x-dev 2008-Nov-28 24.27 KB
Update of Organic groups (to 6.x-1.0) also did not help.
Comment #5
DanilaD commentedTransferred to OG Forum issue.
Comment #6
salvisNo, this is not good. Posts in an OG Forum ought to have og_forum grants.
The post is accessible to 'alumni member' thanks to the forum_access/8 grant. I don't know how OG Forum keeps track of its posts, but since there exist 'og_access:og_public' and 'og_access:og_subscriber' realms, I think there should be corresponding grants.
All node access modules can only provide grants, they can't deny access. IOW, if you don't check any FA checkboxes on an OGF forum, then that forum should be fully controlled by OGF and work as if FA wasn't installed. If you do this, or even disable FA completely, then you should probably see OGF grants ((EDIT:) if OGF works correctly).
Adding FA back should only add additional grants and possibly broaden the range of users who can access an OGF forum.
Thanks for moving the issue — let's hear what the OGF people have to say...
P.S. Thanks for the private notification; this is not really needed, because once you have participated in a thread, the thread will remain in your "My issues" queue no matter where it's moved.
Comment #7
Anonymous (not verified) commentedDigesting this now .
However as the only person maintaining this module at the present time my only objective is to have the OG Forum module working by itself and with OG CTA as a website that i maintain requires these two modules working along side each other. I don't have the time at present to investigate how this module works alongside other contributed modules such as Advanced Forum & Forum Access.
Paul
Comment #8
Anonymous (not verified) commentedYep , ill leave this one.
@Ryan
Can you offer any assistance here ?
Comment #9
Anonymous (not verified) commentedComment #10
Anonymous (not verified) commentedWould you update this issue in the light of improved AF integration
http://drupal.org/node/386566
Comment #11
salvisI'm not sure who you expect to update what, but I don't think this issue is in any way related to AF integration.
Comment #12
Anonymous (not verified) commentedOk, no worries.
Comment #13
Anonymous (not verified) commentedHello,
In order to make best use of our time and fix any compatibility issues still remaining would someone please see if there is still a problem here on the latest 6.x-2.x-dev branch and if there is still a problem report this a new bug using the following schema ..
Please format your bugs as follows ...
Description:
Blah Blah Blah
Repeatable: Always | Sometimes
Steps to repeat:
1. Blah Blah Blah
2. Blah Blah Blah
..
Expected Results:
Blah Blah Blah
Actual Results:
Blah Blah Blah
Detail & Proposed solution:
Blah Blah Blah
Comment #14
Anonymous (not verified) commented