So at first I wasn't sure, but now I'm certain that members on my site are being removed from their groups in what appears to be a completely random occurrence. I'm the only one able to view the site right now, so it's not other folks messing around with their membership.

No errors are being thrown or logged, so I can't say what is causing this or offer much more than my observation.

Has anyone else had this problem?


bryancasler’s picture

Priority: Normal » Major

Well I just figured out that if a users url addy changes, this will remove them from all their groups.

amitaibu’s picture

> users url addy changes


bryancasler’s picture

I am using clean url's and a token from a user profile field to create the user's profile URL.

It looks something like this[token1]/user1

When a user changes their token, it changes their profile URL, and it also removes them from their groups.

Taxoman’s picture

Priority: Major » Critical

(Subscribing, not confirming)

bryancasler’s picture

This may be related to this issue #1203466: Can't use og_group() when group-audience field cardinality is set to 1

I'm not sure how it happened but the "Groups audience" field on /admin/config/people/accounts/fields had it's value switched from unlimited back to 1.

I've just changed it back to unlimited and we'll see what happens.

Taxoman’s picture

ok, what happened? ;-)

bryancasler’s picture

Status: Active » Closed (fixed)

It fixed it.

Taxoman’s picture

Status: Closed (fixed) » Closed (duplicate)
bryancasler’s picture

Title: Members being removed from groups in what appears to be random intervals » Users can only be a member of one group at any give time
Version: 7.x-1.x-dev » 7.x-1.4
Priority: Critical » Major
Status: Closed (duplicate) » Active

re-opening this as it's cropping up again or I never actually got it fixed. The good news is that I can reproduce the problem.

The bug is simple, users can only join one group at any given time. Meaning if they go and join a second group, then they'll be removed from the first. No errors are thrown and the changes happen instantly.

I've used OG on other sites and have not experienced this issue. The website that is having the problem was migrated from a D6 install with OG. So it's possible that something went wrong during the migration and this is how it's manifesting.

Also I'm guessing that this is somehow related #1203466: Can't use og_group() when group-audience field cardinality is set to 1

bryancasler’s picture

Title: Users can only be a member of one group at any give time » A group membership is removed from a users account when they are added to another group

So I've been looking in the DB to see what's going on and here is a step by step breakdown....

In the og_membership table I have a user (ID 1712) who has a user record for two groups (GID 46 and 25).

I go to these groups and look at their membership, this user is listed on both...
GID 46
GID 25

So that's good news! This user is a member of two groups. Lets try to add them to a third (GID 5)
They were successfully added!

But now when we look back at the og_membership table, we see that they are only a member of (GID 46 and 5).

And to confirm, when we refresh the GID 25 members page, they are no longer listed.

bryancasler’s picture

Mini update. I noticed that sometimes people don't get removed from groups they are listed as an "administrator member" of, but that doesn't hold true all of the time... hmmm.

bruitism’s picture

Ok I can confirm this is happening to my as well (all the same symptoms) + also this is a d6 site that has been upgraded to d7.

Only strange thing here is: this did use to work but not anymore. And strangely enough I'm still using og 7-1.3 that has been running smoothly before ...

Sorry I can't supply more helpful information just wanted that I'm affected as well.

bryancasler’s picture

Version: 7.x-1.4 » 7.x-1.x-dev

@Amitaibu @Taxoman Any ideas about where I could continue looking to resolve this? I've really maxed out the limits of my current knowledge.

bryancasler’s picture

Title: A group membership is removed from a users account when they are added to another group » ($300 US Bounty) A group membership is removed from a users account when they are added to another group

Hey everyone, I talked with my boss man we're putting out a bounty for this. Amitaibu suggested I post it in the issue que, so here it is! If anyone can help us resolve this issue, the $300 US is yours.

amitnarang28’s picture

There are few other scenarios when I have noticed that groups are getting lost.
When any module is trying to save user profile, the same issue is happening for random users, these are the two scenarios which I have tried.
1. I tried to save the user profile from drupal edit screen and changed my image, one of my group was lost.
2. I tried to use ldap module for provisioning users/update users, when I logout and login back the user profile get's saved and one or the other group will be lost. This normally happens if you have more than one group i.e. 2nd or 3rd group is getting lost.

I am suspecting it somewhat the issue is lying behind the way user profile is getting save and the way we are having OG membership being saved back for user.
Hope it might help in finding more details.


Taxoman’s picture

For the record, is this a 1.x-only problem, or also happens "occasionally" in 2.x?

frank.schram’s picture

I am getting this too in 7.x-1.5

frank.schram’s picture

I had a rule running that changed the membership state to pending when a new user becomes a group member.
This caused this problem for me. After disabling the rule, a user can become a member of multiple groups again now.
So I will have to find an alternative for this rule to get the membership state to pending when a user subscribes to a group.

bryancasler’s picture

Our site is using OG 7.x-1.4, can't speak to the other versions.

therainmakor’s picture

Is anyone on this issue using the entitycache module? I am using the 7.x-2.x version of OG and the entitycache module was not refreshing the user entity, so whenever the user was loaded then the user's groups were not loaded along with it, so when the user entity was saved the next time the user lost some of its groups.

This behavior only seemed to occur when a user was added to a group from the group's group->add people tab. When a user was added to a group from the user edit page the user entity's cached version from the entitycache module was reset and thus the group was loaded the next time the user entity was loaded.

I disabled the entitycache module and this behavior stopped and a user's groups have not been lost yet. Please let me know if this helps anyone here.

bryancasler’s picture

Our site still suffers from this problem, and we do run the Entity Cache module. I'm going to disable it and do some testing. Will report back.

therainmakor’s picture

Has had any success resolving this by disabling the entity cache module?

bryancasler’s picture

People are still getting removed from a group when they're added to another.

cgmonroe’s picture

If you are using the Entity Cache module, this problem might be related to:

#1981406: Field cache isn't cleared after saving an OG membership

If not, it might give you some ideas where to look.

bryancasler’s picture

Thanks cgmonroe, will be tracking any progress there.

bryancasler’s picture

Title: ($300 US Bounty) A group membership is removed from a users account when they are added to another group » A group membership is removed from a users account when they are added to another group

Removing the bounty.

bryancasler’s picture

Issue summary: View changes