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?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Anonymous’s picture

OK 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?

Anonymous’s picture

This 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 :)

saslib’s picture

This helped me. Thanks heaps.

amitaibu’s picture

Category: bug » support
Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

flashwebcenter’s picture

Version: 7.x-2.x-dev » 7.x-2.0-beta4
Category: support » bug

I 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.

grigorym’s picture

Status: Closed (fixed) » Active

The 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.

Bricks and Clicks Marketing’s picture

I'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?

antoinetooley’s picture

I 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! :)

stiyke’s picture

I 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.

Vemma-1’s picture

Same issue, only title field, then after clicking save, then edit, you can view the body.

Vemma-1’s picture

Version: 7.x-2.0-beta4 » 7.x-2.4
Issue summary: View changes

Any patch or module update for this fix? Thanks. :)

Vemma-1’s picture

Fixed per #2 @Kline

mvlabat’s picture

The issue still exists. Re-enabling module with clearing cache hasn't do the trick for me.

mvlabat’s picture

Version: 7.x-2.4 » 7.x-2.x-dev
mvlabat’s picture

O_o. Strange... Issue solved by itself. Can't even detect a reason.

shushu’s picture

Status: Active » Closed (fixed)
psychobyte’s picture

I 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.

jb.fresh’s picture

#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.

jb.fresh’s picture

Status: Closed (fixed) » Needs review

Status: Needs review » Needs work

The last submitted patch, 19: og-hidden-body-field-1743332.patch, failed testing.

jb.fresh’s picture

FileSize
1.59 KB

Sorry 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.

The last submitted patch, 19: og-hidden-body-field-1743332.patch, failed testing.

jb.fresh’s picture

FileSize
1.59 KB

Reuploading patch with different name to trigger testing!

jb.fresh’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 24: og-hidden-body-field-1743332-1.patch, failed testing.

jb.fresh’s picture

Version: 7.x-2.x-dev » 7.x-2.9
Component: og.module » og-field-access
Status: Needs work » Needs review
bianchim’s picture

Proposing 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 ).

bianchim’s picture

Typo in the patch, forgot the ! in the condition. Reuploading patch.

Status: Needs review » Needs work

The last submitted patch, 29: og-hidden-body-field-1743332-2.patch, failed testing.

jyraya’s picture

The 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.