CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Drupal Modules (Moderator: Donald Lobo) »
  • CiviGroup Roles Sync
Pages: [1]

Author Topic: CiviGroup Roles Sync  (Read 2280 times)

jsimonis

  • I post frequently
  • ***
  • Posts: 316
  • Karma: 4
    • Forward Support, Inc.
  • CiviCRM version: 4.4-4.5
  • CMS version: Drupal 7
  • MySQL version: 5.5.37-cll
  • PHP version: 5.3.29
CiviGroup Roles Sync
October 01, 2010, 02:42:21 pm
We're having difficulty with this not working right.

We have user information already in CiviCRM, as it was imported from a database. The users are added to groups based on that information (not a smart group - we run searches and add people after an import).

People show their CiviGroups on their CiviCRM profile.

The association between Drupal role and CiviGroup has been made.

Now one of those people goes and creates a user account on Drupal. Their account is created and their Drupal login is connected to their CiviCRM profile. However, they are now automatically removed from all the groups in CiviCRM.

What could be causing this? Is there maybe a setting that is missing somewhere?

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: CiviGroup Roles Sync
October 01, 2010, 03:01:10 pm
Sounds odd - what fields do you have in the profile that they are using for their Drupal Account registration?
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

jsimonis

  • I post frequently
  • ***
  • Posts: 316
  • Karma: 4
    • Forward Support, Inc.
  • CiviCRM version: 4.4-4.5
  • CMS version: Drupal 7
  • MySQL version: 5.5.37-cll
  • PHP version: 5.3.29
Re: CiviGroup Roles Sync
October 01, 2010, 06:26:16 pm
First name, last name, city

jsimonis

  • I post frequently
  • ***
  • Posts: 316
  • Karma: 4
    • Forward Support, Inc.
  • CiviCRM version: 4.4-4.5
  • CMS version: Drupal 7
  • MySQL version: 5.5.37-cll
  • PHP version: 5.3.29
Re: CiviGroup Roles Sync
October 02, 2010, 07:21:56 pm
The groups in CiviCRM are fine until you register an account. As soon as you create the Drupal account, all the CiviCRM groups get removed. When you go to the person's CiviCRM profile and view their groups, all of them say they were removed by the API. I can re-add them via that page and then the associated role(s) are added to their Drupal account.

The odd thing is it used to work fine and now it's not.

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: CiviGroup Roles Sync
October 02, 2010, 07:36:35 pm
And this is just a 'standard' profile that is set up to be part of the Drupal Registration. Did it change post an upgrade?
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: CiviGroup Roles Sync
October 02, 2010, 07:45:41 pm
since we can test on Demo - I thought I would give this a go on one of ours on 3.2.3..
Are these equivalent steps to yours?
Step 1 - create civicrm contact and add to two (non-smart) Groups
Step 2 - on a different browser, 'create new user = Jane' with same email (this site has the standard New Individual as the Drupal sign-up Profile)
Step 3 - check Jane's record - still has 2 Groups (or not in your case)
Step 4 - log in as Jane
Step 5 - check Jane's record - still has 2 Groups

Is there something peculiar about the Profile you are using for Drupal sign up?
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

jsimonis

  • I post frequently
  • ***
  • Posts: 316
  • Karma: 4
    • Forward Support, Inc.
  • CiviCRM version: 4.4-4.5
  • CMS version: Drupal 7
  • MySQL version: 5.5.37-cll
  • PHP version: 5.3.29
Re: CiviGroup Roles Sync
October 02, 2010, 10:48:24 pm
No, as far as I know, nothing changed. However, I've found people don't always want to admit they made a change that broke something, so it's possible something was changed somewhere that I can't find.

Your steps sound about right.

What I've been doing to test it is...

[Site setup: CiviGroups Role Sync turned on; roles created in Drupal; groups created in CiviCRM; sync rules set up for matching group to role]

- Create a new record in CiviCRM and add it to a few groups.
- Go in another browser, go to create new account
- Create new account
- We're automatically logged in after the account is created.
- Go to my account page - no roles listed. CiviCRM fields can be seen (first name, last name, city)
- Go check CiviCRM - the person has now been removed from all groups.
- I can then click the rejoin link. The person is added back to the groups and the correct roles are assigned to the person.

jsimonis

  • I post frequently
  • ***
  • Posts: 316
  • Karma: 4
    • Forward Support, Inc.
  • CiviCRM version: 4.4-4.5
  • CMS version: Drupal 7
  • MySQL version: 5.5.37-cll
  • PHP version: 5.3.29
Re: CiviGroup Roles Sync
October 05, 2010, 10:39:31 pm
I just removed all the CiviCRM groups and the sync rules.

Then I re-did all the searches and recreated the CiviCRM groups.

Then I re-did the sync rules.

I just created an account and the same thing happened - the API removed the person from all the CiviCRM groups.

jsimonis

  • I post frequently
  • ***
  • Posts: 316
  • Karma: 4
    • Forward Support, Inc.
  • CiviCRM version: 4.4-4.5
  • CMS version: Drupal 7
  • MySQL version: 5.5.37-cll
  • PHP version: 5.3.29
Re: CiviGroup Roles Sync
October 08, 2010, 03:15:44 pm
Still isn't working properly and I can't find anything that would have changed to have caused this.

jsimonis

  • I post frequently
  • ***
  • Posts: 316
  • Karma: 4
    • Forward Support, Inc.
  • CiviCRM version: 4.4-4.5
  • CMS version: Drupal 7
  • MySQL version: 5.5.37-cll
  • PHP version: 5.3.29
Re: CiviGroup Roles Sync
October 25, 2010, 12:54:33 am
Ok, I completely rebuilt everything.

I started with a clean install of CiviCRM 3.2.3.

I created my custom fields.

I created my two profiles (one that is used for the Drupal reg form and one that is used on the My Account page).

I added the fields to the profiles.

I imported our data.

I added people to groups based on data on their record (status, what group they're in, etc.).

I made sure our matching was set as I needed.

Turned on CiviGroup Roles Sync.

Set up what Drupal role matches to what CiviGroup.

Created a record in CiviCRM for testing. Added it to specific groups.

In another browser I created a new Drupal account with the same info as the test account above.

Once the account is created, the person is automatically logged in.

They are not listed with any Drupal role.

Go check their CiviCRM record. It now shows they've been removed from the 3 groups they were a member of - "Removed (by API)".

This is getting really frustrating, as it worked previously and now it isn't.

This version hasn't been touched by any of their staff, so I know they haven't made changes to it.

What could be causing this?

jsimonis

  • I post frequently
  • ***
  • Posts: 316
  • Karma: 4
    • Forward Support, Inc.
  • CiviCRM version: 4.4-4.5
  • CMS version: Drupal 7
  • MySQL version: 5.5.37-cll
  • PHP version: 5.3.29
Re: CiviGroup Roles Sync
October 25, 2010, 01:10:21 am
Since I absolutely have to get this working so people can begin registering, I went through the process to export the info and then import as Drupal users. Sure enough, the same thing happened again. Everyone was removed from the groups inside CiviCRM.

Thankfully this is a quick fix since I can run Advanced Searches and re-add them. But I need this automated part to work the way it is supposed to.

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: CiviGroup Roles Sync
October 25, 2010, 03:33:14 am
Hi,

Don't know if it's related, but a related problem in the api (it deleted all the groups before recreating them and sometimes missed some if I recall). I'm pretty sure Erik fixed it in the next version 3.3.

Can you install the 3.3. alpha and check if it works for you ?

? Or can we enable the module in sandox ?

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

jsimonis

  • I post frequently
  • ***
  • Posts: 316
  • Karma: 4
    • Forward Support, Inc.
  • CiviCRM version: 4.4-4.5
  • CMS version: Drupal 7
  • MySQL version: 5.5.37-cll
  • PHP version: 5.3.29
Re: CiviGroup Roles Sync
October 28, 2010, 10:10:31 pm
I'd be happy to test out the alpha.

I'll try to grab a copy of their site this weekend and test it out to see if it works. I will be soooo happy if it does!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Drupal Modules (Moderator: Donald Lobo) »
  • CiviGroup Roles Sync

This forum was archived on 2017-11-26.