In admin - structure - types - manage - [custom content type], the combo box "Target Bundles", is ignored.
We have content types A, B and C, behaving like groups.
We have content type AA, behaving like group content.
I expected to use that "Target Bundles" box so that only A-type nodes could be elected as Audience for a new AA-type node.
When creating a new AA-type node, though, I can still see all group-type nodes (A-type groups, B-type groups, C-type groups) as possible Audiences for my new AA-type content.

Comments

CSch’s picture

Yes, I can affirm that as well. I tried to restrict a content type as OG group content to a target bundle listed in the appropriate select box for the same reason (with A the only audience for AA). The selection box "Target bundles" implies that one can select a bundle for the OG content type as a selectively assigned audience. The note below the field says:"The bundles of the entity type that can be referenced. Optional, leave empty for all bundles." But bundles one has selected will not be saved and 'remembered' here and this selection will have no effect on the audience bundles provided for a user, who creates content of that type.

nlm’s picture

Ran into similar type issue...think something to do with all the group audience fields using the same machine name. Maybe could try something like:

For content type AA (that can only post into A group), when you add the group audience field via (Configuration->OG field settings) give it a different machine name (ie. og_group_ref_a).

For content type BB (that can only post into B group), give it a difference machine name for the group audience field (ie. og_group_ref_b).

sk2013’s picture

Is this issue is fixed? Could some one have any solution to the issue Please?

Thanks

jastraat’s picture

Field configuration has two parts: configuration specific to an instance of a field on a content type and configuration that is part of the field base and applies everywhere the field is used. The target configuration is part of the field base, so if you want different content types to be able to target different group types, you need to use different group audience fields. (They cannot all be og_group_ref.)

bhawanac’s picture

#2 is the solution for this.

Refer: https://www.drupal.org/node/2014781

ashwinsh’s picture

#2 worked for me, thank you nlm.

delacosta456’s picture

#2 Worked for me too as workaround. but another issue that may occur (was the case for me) for this workaround is what have been mentioned here : Custom OG Reference fields missing from OG Admin Fields UI

- So can wee go ahead safely with the #2 solution without having other issue ?
- Also, doing this will it not impact any king of subgroup logic, where we may want C subgroup of => B subgroup of =>A ?

Thanks