Hmm. This is puzzling.
On /node/add/post , when selecting "Post to specific groups", it gives an autocomplete field by default.

I want to present the users with either checkboxes or a select list, so I go to /admin/structure/types/manage/post/fields
- but there when I actually change Group content visibility (group_content_access - List (integer)) to
"Check boxes/radio buttons" , it does not change the display of the autocomplete list on /node/add/post

Is there something I am missing?

- and why is that not already a select list of the same type as for example the Topics gives; with the ability to type and to see the complete list without typing anything, both at the same time?

Edit: "of the same type as for example the Topics gives", is partly incorrect.
The Topics field does not provide that kind of list either out of the box, BUT for that field I can actually go to the content type, edit the field and change the widget to get such a list.
This normal Drupal customization is what I am looking for - but it seems that the very field itself that handles the Group selector is not even listed on the fields page of the Post content type....

Comments

Leeteq’s picture

(PS. I have cleared cache, etc. after making that change, still only autocomplete field.)

Leeteq’s picture

Title: Group checkboxes instead of autocomplete on POST creation? » Group checkboxes or Select list instead of autocomplete on POST creation?
Issue summary: View changes
Leeteq’s picture

(I ask "why is that not already a select list" as I come to assume that there might be a technial explanation or even limitation (or complexity/lack of time/resources) as of why that is not already a select list, as it would seem like the obvious user-friendly choice, which is already used for Topics.)

Leeteq’s picture

Hm. When looking closer, it seems tha that is the wrog field, and the field in question is simply not available on the content type page (..?!..), which means it is hardcoded? Is there any way of managing this through the GUI?

Leeteq’s picture

Issue summary: View changes
japerry’s picture

Status: Active » Postponed (maintainer needs more info)

Hello, indeed you're looking at the wrong field. You're looking for the og_group_ref field, that is what manages which groups you can add content (like a post) to.

Leeteq’s picture

Category: Support request » Bug report
Status: Postponed (maintainer needs more info) » Active

Yes, indeed.
I was looking at the widget on the main fields page, which is set to "OG reference" and seemed like nothing I would dare touching, and the other field was set to select list already, without visible effect. Now that I clicked on EDIT on that Group field, I find the relevant settings.

This is the field URL where these settings are:
/admin/structure/types/manage/post/fields/og_group_ref

So now I have set it to checkboxes, and they are appearing as expected.
However; now I also have the same list in two fields:
Your Groups
and
Other Groups
are now showing full list with checkboxes for all groups (two identical lists)...

And I could not see any visible change when I also selected:
"Allow entity access to control field access"

Expected behaviour would be to have two distinctly different lists (mutually exclusive) for Your and Other...

Is this a bug?

Leeteq’s picture

Title: Group checkboxes or Select list instead of autocomplete on POST creation? » Group checkboxes or Select list confusion for the og_group_ref field (POST content type)

Accessing the node/add/post page with a normal, authenticated user without any extra permissions, shows only the list(s) that user belongs too, and works as expected.

I am now just a bit confused as of how this is meant to work for an administrator.

The descriptive text below each of the lists are as follows:

Your groups:
"Associate this content with groups you belong to."

Other groups:
"As groups administrator, associate this content with groups you do not belong to."

For my admin user both lists contain exactly the same groups.
Is this a bug, or is there a logic to it?

Those two lists are identical and show all groups regardless of the previously mentioned setting;
"Allow entity access to control field access" is enabled or not.
I also have a problem "getting" exactly what I should expect from enabling that option.
I believe that understand that the entity is a node, and the node access should then take precedence over the field-specific security settings, but how (or when) would they differ, and does it mean that either the field will be visible or hidden, or that the content of the list (which groups are listed) will be affected/limited?

Please enlighten me :-)

(Although this is clearly also a support request, I am considering it as more of a "descriptive text" bug. We can probably improve the descriptive text significantly to help people understand what these options do.)

Leeteq’s picture

Further on this:
When masquerading away from the Group Administrator user and into the main site admin (uid1) (who happens to have the OG group administrators ROLE as well), and from that user trying to create a new Post, then the following "lists" are visible on /node/add/post ...:

Your groups:
- Administration (internal)
"Associate this content with groups you belong to."

Other groups:
- Administration (internal)
"As groups administrator, associate this content with groups you do not belong to."

Hence, both lists are showing the same option, only the single one group that uid1 happens to be member of, and the "Other groups" does not list any of the other groups at all.

There is no difference in the displayed groups/lists or any visible effect of enabling or disabling the "Allow entity access to control field access" option.
(PS. I have NOT enabled the sub-module "Organic groups field access" on this site yet, that might be relevant to how that option works. Just mentioning all aspects I notice here. And the "Organic groups access control" sub-module had been enabled all along, since the creation of the site.)

So, if I actually understand the purpose of "Other groups", then this must be a bug.
Otherwise, that "Other groups" option just keeps confusing me.

Leeteq’s picture

(BTW, should this be moved to the OG issue queue, or is it specific to Commons?)

japerry’s picture

In stock OG, users are only able to post into groups they already belong to. With commons, we alter the access so that users can post into public groups that are joinable without needing approval. Because of that, it makes the default OG 'post to groups you don't belong to' portion irrelevant for an admin.

Since we don't support the select box by default, changing the widgets could cause some odd behaviours, since commons alters some of the og widgets on the node edit forms to conform with the default installation.

If you wish to remove the 'other groups' portion, I'd recommend using a form alter to set the individual element access to false.

Leeteq’s picture

Hmm, ok, how about adding a comment about just the fact that one should expect that odd behaviour and that it is not supported in commons, to the existing description of the affected field(s)?

Also might offer a customizeable option to hide that "other groups" list, but then with an enlightening description of just how this might (not) work. I think the challenge here is to present the options and effects to the user just where the options are changeable.

sturad’s picture

Hello, our users also requested checkboxes over the autocomplete list so I was happy to find this workaround.

japerry or leeteq, I was hoping you could comment on more specifically on the odd behaviors we could expect. I worked through minimally how to alter the appearance of the form through implementing hook_form_commons_bw_partial_node_form_alter(). However, I think there is a lot of other validationand other logic to deal with here so I predict worse odd behavior trying do this through code. Your feedback on what could go wrong on doing this through the UI very much appreciated. Thanks.