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.
Hi,
I've just enable og_access, and I found some problems.
The group visibility field widget has no data in it (not showing public group, private..., join this group...).
I've red this comment https://drupal.org/comment/7529685#comment-7529685, and I can see that it is hardcoded to FALSE any access to this field in any cases.
I think it should be good to check if we are viewing the node or editing the node, this way we can show the field in node views and deny access when editing.
I've attached a patch for it.
Comments
Comment #1
japerryadding to the group privacy revamp meta issue
Comment #2
japerryComment #3
TuWebO CreditAttribution: TuWebO commentedMaking the patch relative to the correct path.
Comment #4
TuWebO CreditAttribution: TuWebO commentedRerolled the patch to math current version 3.13
Comment #5
TuWebO CreditAttribution: TuWebO commentedRerolled,
Making path to the root of the commons_group, also changed version.
Comment #6
TuWebO CreditAttribution: TuWebO commentedPatch Reroll with the latest dev changes.
Comment #7
TuWebO CreditAttribution: TuWebO commentedPatch Reroll with the latest dev changes.
Comment #8
TuWebO CreditAttribution: TuWebO commentedPatch Reroll with the latest dev changes.
Comment #9
isellakuria CreditAttribution: isellakuria commentedIs this patch working for you? I used it but I still cannot see the field.
Comment #10
TuWebO CreditAttribution: TuWebO commentedHi sellakuria,
It is working for me. I have it on a panelized group, and it is working fine so far.
Comment #11
TuWebO CreditAttribution: TuWebO commentedHi,
Patch has been rerolled with a little change. Also issue category has been changed, since not been able to see a group visibility fiel for a public group is more like a bug than a feature request.
Comment #12
TuWebO CreditAttribution: TuWebO commentedHi,
Make some changes to the patch, since we should take in account og_field_access and that entity exists.
If someone could test it, will be great.
Comment #13
TuWebO CreditAttribution: TuWebO at Metadrop commentedHi,
I think this issue is not resolved yet, I have tested it with the patch in #12, and it works, have anybody tested it?
Comment #14
MrBrightside CreditAttribution: MrBrightside as a volunteer commentedI'm pretty new to this, but hope my findings can help. I applied the patch manually (I can provide the code of the function if it helps to check it) but I still couldn't see that pesky drop-down for 'Group content visibility'.
After a bit of hacking about I managed to get it to display by commenting out the two following lines:
function commons_groups_field_access:
function commons_groups_form_node_form_alter:
//$form['group_content_access']['#access'] = FALSE;
(as detailed in the description and https://www.drupal.org/node/2018039#comment-7529685)
And then when editing choosing the following got the wiki in question to show on the front end when not logged in:
* Public - accessible to all site users
* Post to specific groups
If this post isn't helping let me know I'll remove it.