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 a regular user tries to create content they have group permissions to create - the body field is not displayed - only the title. It seems no other fields are displayed either, only title. This only happens when I set the content type to be group content.
As an admin I do see body field plus other fields. I've checked my permissions and they're correct. Anyone else encountered this or have any suggestions I can try to troubleshoot?
Comment | File | Size | Author |
---|---|---|---|
#29 | og-hidden-body-field-1743332-2.patch | 1.04 KB | bianchim |
Comments
Comment #1
Anonymous (not verified) CreditAttribution: Anonymous commentedOK I disabled organic groups field access module and the fields appeared, but I can't seem to get it working with field access enabled. Any ideas, is there a hidden permission setting for content type fields or something?
Comment #2
Anonymous (not verified) CreditAttribution: Anonymous commentedThis seems to be working better after disabling, clearing cache, re-enabling.. field access options are working as they should. Hopefully this issue will help someone if they have a similar problem :)
Comment #3
saslib CreditAttribution: saslib commentedThis helped me. Thanks heaps.
Comment #4
amitaibuComment #6
flashwebcenterI had the same issue where is the body field was not showing for a user X. I did enable and disable the module but it did not fix the problem. The solution was after enabling the og_field_access you have to go to admin/config/group/permissions/node/group and give permission to the user x to edit the field you want to be seen. Then go to /admin/reports/status and rebuild the permission then flush the caches.
What happened is when you enabled the og_field_access it resets all the fields permission in the post content. Or when you create a new group content type you have to go and enable permission to the fields.
Comment #7
grigorym CreditAttribution: grigorym commentedThe problem seems indeed to be in "OG field access" module: disabling it allows the creation with all fields. But in my case of clear installation, no matter how I rebuild permissions, clear the cache, re-enable the module - in any order, the problem remains: only title is shown.
Comment #8
Bricks and Clicks MarketingI'm having this same problem, with a slight difference:
1. Members can create group content and can only see the Title field.
2. After the group content is created, members have the permission to edit their content. On the edit page, the body field is there!
So there must be something small I'm missing that would allow the member to edit the Body when creating the group content initially. Ideas?
Comment #9
antoinetooley CreditAttribution: antoinetooley commentedI am having a very similar problem but for me members can see the body and group audiences fields but not the title field so at the moment there is no way for a member to post any content!
I had this issue once before on a different site but then I got it working somehow but now I have tried uninstalling, flushing cache etc but I just can't seem to get it work.
Is anyone else still having this issue?
I am using the course module which requires ACL so I wander if its a conflict of permissions and if there is any way to set organic groups as a master permission setter?
Thanks to anyone who can help! :)
Comment #10
stiyke CreditAttribution: stiyke commentedI had same experience too as kline state. Only i noticed that when i set a content to be group content, it adds another field Group Audience with field type boolean instead of Entity reference.
If you try to create the content for the group, you get this message:
Notice: Undefined index: handler in og_field_widget_form() (line 34 of /home/idealpol/public_html/sites/all/modules/og/includes/og.field.inc).
Notice: Undefined index: handler in og_field_widget_form() (line 34 of /home/idealpol/public_html/sites/all/modules/og/includes/og.field.inc).
Field Groups audience is a group-audience but its Entity selection mode is not defined as "Organic groups" in the field settings page.
I have to go to content's manage field settings and add a field of type Entity Reference and select OG reference as widget type before it could work of course i disabled og_field_access too.
Comment #11
Vemma-1 CreditAttribution: Vemma-1 commentedSame issue, only title field, then after clicking save, then edit, you can view the body.
Comment #12
Vemma-1 CreditAttribution: Vemma-1 commentedAny patch or module update for this fix? Thanks. :)
Comment #13
Vemma-1 CreditAttribution: Vemma-1 commentedFixed per #2 @Kline
Comment #14
mvlabat CreditAttribution: mvlabat commentedThe issue still exists. Re-enabling module with clearing cache hasn't do the trick for me.
Comment #15
mvlabat CreditAttribution: mvlabat commentedComment #16
mvlabat CreditAttribution: mvlabat commentedO_o. Strange... Issue solved by itself. Can't even detect a reason.
Comment #17
shushu CreditAttribution: shushu commentedComment #18
psychobyte CreditAttribution: psychobyte commentedI seem to be having this issues as well, OG-7.x-2.7. However, I noticed in my case that the fields are missing if my user does not have a og node created. For example, a new user comes in and has no nodes. the user creates a Property node(og content only), only the title fields is visible. If however, the user creates an Group node(OG) THEN goes to create a property node, all fields are visible. The Property node is not even associated with the Group node yet it helps the situation.
Comment #19
jb.fresh CreditAttribution: jb.fresh as a volunteer commented#8 pointed me to og_field_access. The problem is this module calls og_get_entity_groups(). When the user does not belong to any groups then og_get_entity_groups returns an empty array which will cause og_field_access_field_access() to return false. This patch will modify the base case for og_field_access_field_access() to also check that the user belongs to a group.
Comment #20
jb.fresh CreditAttribution: jb.fresh as a volunteer commentedComment #22
jb.fresh CreditAttribution: jb.fresh as a volunteer commentedSorry I'm still not quite sure how to properly create and submit a patch. I remade the patch following https://www.drupal.org/project/og/git-instructions.
Comment #24
jb.fresh CreditAttribution: jb.fresh as a volunteer commentedReuploading patch with different name to trigger testing!
Comment #25
jb.fresh CreditAttribution: jb.fresh as a volunteer commentedComment #27
jb.fresh CreditAttribution: jb.fresh as a volunteer commentedComment #28
bianchim CreditAttribution: bianchim commentedProposing a new patch for this issue, since the previous patch was breaking the tests. I move the early return in the patch a few lines later, in order to keep the fix, without breaking the way the module should work ( and pass the tests too ).
Comment #29
bianchim CreditAttribution: bianchim commentedTypo in the patch, forgot the ! in the condition. Reuploading patch.
Comment #31
jyraya CreditAttribution: jyraya at European Commission and European Union Institutions, Agencies and Bodies commentedThe last patch fails in the automated tests but also when I ran locally those that are specific to og_field_access.
Furthermore, when I defined a group and a group content and I set that non-member users cannot view the body field of my group content, the body field is nevertheless displayed when a non-member user view the node of my group content.