Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When clickingon the group tab group managers get the message that access is denied. They are unable to add members to the group!
Comment | File | Size | Author |
---|---|---|---|
#7 | stcolumbachester.com-2013-10-16T12-51-52.mysql_.gz | 211.94 KB | spgd01 |
Comments
Comment #1
CarlHinton CreditAttribution: CarlHinton commentedThis is an issue with access to the menu in og_ui.module line 44 - the access callback og_ui_user_access_group is not working as expected
Comment #2
amitaibuNeed more info on how to reproduce on a clean installation.
Comment #3
spgd01 CreditAttribution: spgd01 commentedI have the same issue.
I then get access denied. The url for the access denied page is:
group/node/382/admin/people/add-user
The OG Access module is uninstalled.
Comment #4
RoySegall CreditAttribution: RoySegall commentedWith which user are you getting this error? The admin(user 1)? A group manager? a group member? If you'r not going to the page as admin what did you gave to the user's roll?
More specific steps would helpful for this issue.
Comment #5
spgd01 CreditAttribution: spgd01 commentedSorry, I am going in as User 1 The supper Admin. I do not have any other users at this point. This is a fresh install and I just set up OG.
Comment #6
RoySegall CreditAttribution: RoySegall commentedOK, is there a watchdogs alerts? Can you supply a database dump?
Comment #7
spgd01 CreditAttribution: spgd01 commentedNo error messages Just this from the log:
Comment #8
spgd01 CreditAttribution: spgd01 commentedI just went to:
admin/config/group/roles
and recive a number of these warnings:
Warning: Invalid argument supplied for foreach() in element_children() (line 6392 of E:\Websites\ws_090330_01_stcolumbachester\htdocs\beta\includes\common.inc).
Comment #9
RoySegall CreditAttribution: RoySegall commentedOK, looking on your dump i can see that there are no roles and you get access denied because the function og_ui_user_access_group() check if there are any roles and if there isn't any role the access callback return false.
Did you upgrade your OG from older version to 2.x? On a clean installation of drupal you can't delete all your roles and this is something weird.
Comment #10
spgd01 CreditAttribution: spgd01 commentedNo it was a fresh install. I did add a role at some point and then I uninstalled and reinstalled the Dev version. I am not sure if it was the dev version or the adding roles, but it works now. I think it was the roles. Thank you for your help. For me this is closed but it looks like original poster had roles so i will leave it open.
Comment #11
jmev CreditAttribution: jmev commentedI have this same issue with one of my three groups. It's set to both be a group and group content, as is the case with another content type that works fine. I do have roles enabled for the administrator to edit the content type, so what else would I need to do?
Comment #12
creact CreditAttribution: creact commentedSame problem here.
Comment #13
shushu CreditAttribution: shushu commentedIn order to try and help we do need more information.
First, this was opened on 2.3. If this is the version you are using, please upgrade to latest stable version and verify it still exist.
Second, please try to provide a clear scenario on how to reproduce the problem.
Once you do it, please change status back to "Active".
Comment #14
jmev CreditAttribution: jmev commentedI'm on OG 7.x-2.5, and I figured out that there was a database corruption issue. By removing all of the group fields and re-adding them, the issue was solved. However, it may be that simply removing and re-adding the group field is sufficient. The more complex solution I had found at first was to edit the og_role table and make sure there are were records for the content type in question, one for each of: non-member, member, administrator member. These need to have the gid field set to '0' (zero).
You can use the following SQL statements to help you easily insert these needed records (substitute 'my_content_type' with your content type's machine name):
Then, there needs to be a matching record for each of the actual nodes that are of that group type. For example, if there is a group node with 'nid' of 15, then you have to have a record for that nid (in this case, it will become the gid field in the og_role table).
I hope this helps someone.
Comment #15
meanderix CreditAttribution: meanderix commentedThis problem occurred for me after changing the machine name of the OG context type. Fixed it by adjusting the og_role table as suggested by #14.