I have setup Drupal 6.14 with Organic groups 6.x-2.0 and og_forum 6.x-2.2.
I want a seperate forum for each group with read/write access limited to that group.
When I go to "/forum" as admin I see the forums. The group forums link to "forum/forumgroupname/forumgroup".
When I click the link I come to for example: "node/4601/og/forum/188". Everything is ok.
However, when a member of the group clicks the link they get a "page not found".
Also, something intersting, the group user have a menu block that is limited to a user role. When the user click the link and get the "page not found" the menu is gone, thereby the role aswell?
If I go to the url of a forum post in the forum the users can see that.
I have looked all over for access control but cannot find anything.
Comments
Comment #1
mpotter commentedI'm actually getting the same problem here. Just trying OG Forums for the first time. My group is Closed. I have added a user to the group. User-1 can see the group and the post within the group forum. The normal user in the group can see the Group Forum in the main Forum List, but clicking on the Group Forum gives "Access Denied". However, if I paste the URL of the actual post within the group forum, it is displayed correctly. It's just the top level view of the Group Forum (the list of posts) that cannot be accessed.
I am running Advanced Forums 1.x and also Forum Access (again, for normal forums on the site). Disabling both of these modules did not help. I'll keep looking for other permission settings to try.
Comment #2
mpotter commentedMy group was set to "Closed Membership". When I changed the group to be "Invite Only" then it worked and the group forum was properly visible to group members. You might give that a try to see if it works for you.
Edited: Nevermind, that caused the posts within the Group Forum to be readable by anybody. Seems to be a conflict between the OG Forum access rules and the Forum Access module. If I restrict the Group Forum using the Forum Access settings, then I can prevent anonymous users from accessing the content of the group. But then it ignores group membership...authenticated users can view *any* group forum content.
Looks like the OG Forum module is only controlling whether a user can see the group, but the Forum Access module is still controlling the access to the forum posts themselves. Maybe I need to just completely remove Forum Access entirely. Although the last time I disabled the Forum Access module, I lost access to *all* forum posts. This whole thing is just getting really confusing. All I want is private forums assigned to Organic Groups and public forums using the normal forum module.
Comment #3
donquixote commentedsame problem here.
Comment #4
donquixote commentedMarking as bug report, until someone proves me wrong..
Maybe this needs to be fixed in forum_access instead. In this case, we should rather create a new issue over there, to reduce confusion.
Comment #5
donquixote commentedI found what is happening:
Probably this can be fixed with module weight (use the utility module).
I think og should make sure it runs first in hook_init. Or run in hook_boot instead.
Comment #6
donquixote commentedmodule weight is insufficient.
We get a classical wolf-bites-its-tail problem here.
og_init does actually call menu_get_item() itself, indirectly, in more than one way, invoking the og_forum stuff that expects og_init to have finished already.
Here is the backtrace for my site. Others might have different modules causing the damage.
Comment #7
donquixote commentedSee also #553944: Define hook_menu_get_item_alter() as a reliable hook that runs before the page is doomed.
Comment #8
donquixote commentedSee also #285696: array_keys error.
Comment #9
donquixote commenteduser_load() helps.
Here is my fixed wildcard loader.
I think this is not yet the solution that we should be happy with.
Imo, the access checking should be in an access callback, not in the wildcard loader. And imo, we should display something like "Please join this group so you can see all discussions", instead of "page not found".
This would still need this user_load() fix in the access callback.
Comment #10
donquixote commentedPlease forgive me if I don't post a patch. I hope the above code helps.
I post tons of bug reports with fixes in the d.o. issue queue, and taking the time to produce a patch for each is simply not realistic. If someone else wants to take the time, go ahead.
Thanks!
Comment #11
vegantriathlete