After the changes to the OG audience widget I have a new problem I didn't have before. I can reproduce it on a new install as follows:

1) Create a vocabulary and make it a group. You can only do that by adding the group field to the taxonomy entity at admin/config/group/fields.
2) Create a content type and also make that a group.
3) Create a content type that is to become group content for the node group. Choosing that option in the content type edit screen will add the og_group_ref field to the group, with a target type of 'node'.
4) Create another content type that is to become group content for the taxonomy group. Choosing that option in the content type edit screen gives you a place to indicate that the source for that field should be the taxonomy term. That will also add the og_group_ref.

You now have two instances of og_group_ref. One should be pointing to nodes and one to taxonomy terms. If you edit them you will see that they both point to the same source and there is no way to have one use taxonomy and the other use nodes. If you change one, the other will change too.

I have solved this in earlier versions by going back to admin/config/group/fields and adding another group audience field so I could give it a different name and point it to a different type of entity, but that no longer works. I now get a message that the field already exists. There is no way to add the field on the manage fields screen, so I am out of options.

I don't believe this is the way this is supposed to work. ATM it appears there is no way to have groups on more than one type of entity, everything points to one type of entity or the other.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

KarenS’s picture

Also there is now no way to have a content type that belongs to both a taxonomy group and a node group. I used to be able to do that by adding two different audience fields to the content type.

amitaibu’s picture

Category: bug » support
Priority: Major » Normal
FileSize
17.65 KB
44.21 KB
62.56 KB
40.78 KB
56.19 KB
34.59 KB
33.37 KB

Hi KarneS!
If you want to have fields referencing different group-types, you can/ should create the fields via the field UI, with different names. I took the time to do some screenshots, that show it works fine.

Changing to support request, unless I've misunderstood your issue. Let me know if its ok.

EDIT: Going to re-load the images, as some were wrong.

amitaibu’s picture

Category: support » bug
Status: Active » Needs review
FileSize
440 bytes

So first, indeed there was a bug og_get_og_membership_properties(), attached patch.
Images will follow... :)

amitaibu’s picture

FileSize
17.65 KB
58.77 KB
103.24 KB
40.78 KB
56.19 KB
34.59 KB
33.37 KB

Correct images (with patch from #3 applied):

og1.jpg

og2.jpg

og3.jpg

og4.jpg

og5.jpg

og6.jpg

og7.jpg

btw, what's your use case for term as group?

amitaibu’s picture

Status: Needs review » Fixed

Committed, patch in #3.

Status: Fixed » Closed (fixed)

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