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) »
  • Discussion (deprecated) »
  • Alpha and Beta Release Testing »
  • 4.1 Release Testing (Moderator: Kurund Jalmi) »
  • Sync member - roles error
Pages: [1]

Author Topic: Sync member - roles error  (Read 3869 times)

msn

  • I post frequently
  • ***
  • Posts: 152
  • Karma: 6
  • Please talk to the other site
Sync member - roles error
December 25, 2011, 03:12:20 am
Cannot sync members with drupal roles. It does not matter how: auto, cron, login, member updated....
Error:
Code: [Select]
Notice: Undefined index: 6 in _civicrm_member_roles_sync() (regel 558 van /home/public_html/drupal-7/sites/all/modules/civicrm/drupal/modules/civicrm_member_roles/civicrm_member_roles.module).

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Sync member - roles error
December 25, 2011, 03:31:08 am
Seems like your Association Rules are off. Can you confirm they are correct? And that all roles exist?
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

msn

  • I post frequently
  • ***
  • Posts: 152
  • Karma: 6
  • Please talk to the other site
Re: Sync member - roles error
December 25, 2011, 03:55:39 am
First: have a nice Christmas!

Rule and role are present.
I have 2 test users in drupal with a drupal account and in CiviCRM in CiviMember.
I did read te Readme again, could it be that I have other contacts that are not users and members?

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Sync member - roles error
December 25, 2011, 04:07:37 am
No I am talking about "roles" not users. Visit

admin/config/civicrm/civicrm_member_roles/show_rules

and tell us what you see there.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

msn

  • I post frequently
  • ***
  • Posts: 152
  • Karma: 6
  • Please talk to the other site
Re: Sync member - roles error
December 25, 2011, 04:17:59 am
There is a role, see attachment

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Sync member - roles error
December 25, 2011, 04:55:59 am
Go to your Drupal roles page and see what is the ID of that role. If you click on it, you can deduce it from the URL. Seems the code is looking for a role of ID 6 and not finding it....
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

msn

  • I post frequently
  • ***
  • Posts: 152
  • Karma: 6
  • Please talk to the other site
Re: Sync member - roles error
December 25, 2011, 05:54:56 am
Role #6 is present.

I made a db backup (drupal+civi), deleted the #6 role, cleaned caches (drupal+civi) and tried the sync again: without role #6 the error is still there. Placed my original db back.

I reinstalled the civicrm_member_roles module: no effect.



Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Sync member - roles error
December 25, 2011, 06:13:21 am
Hmm, so what is regel 558 van /home/public_html/drupal-7/sites/all/modules/civicrm/drupal/modules/civicrm_member_roles/civicrm_member_roles.module ? And what version of CiviCRM is this?
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

msn

  • I post frequently
  • ***
  • Posts: 152
  • Karma: 6
  • Please talk to the other site
Re: Sync member - roles error
December 25, 2011, 07:11:19 am
Code: [Select]
if ( is_array( $memberroles[$membership['membership_type_id']] ) ) {
CiviCRM 4.1.beta1 (updated from alfa version, and moved to another domain)
Drupal 7.10

I dont't ike the idea: but considering to make a new civicrm setup to have a clean db.  I had some issues with leftovers from old domain/version transfers. There are no url or directory structure errors now.  One issue is  not yet solved http://forum.civicrm.org/index.php/topic,22761.0.html. 
The question is: would a new civicrm setup help, this issue could be related to drupal?



Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Sync member - roles error
December 25, 2011, 08:52:12 am
It's looking for a membership_type_id of 6. Do you have such?
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

msn

  • I post frequently
  • ***
  • Posts: 152
  • Karma: 6
  • Please talk to the other site
Re: Sync member - roles error
December 25, 2011, 02:57:39 pm
Yes I have a membership_type_id 6.

When I change the rule synchronize to another membership I get te same error with different undefined index numbers (2 and 6).

I analysed my db, field civicrm_membership:
Maybe there is a relation with the contacts who have a membership. In my setup I have 3 contacts, two of them have membership type id 2 and one has id 6. When I set my sync rule to an unused membership type a have 3 errors, 2 with index number 2 and one with id 6. The same.







msn

  • I post frequently
  • ***
  • Posts: 152
  • Karma: 6
  • Please talk to the other site
Re: Sync member - roles error
December 25, 2011, 04:25:51 pm
When I make a rule for memberships with contacts, in my case a rule for membership id 2 and 6, the error is gone. But synchronizing is not working.

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Sync member - roles error
December 25, 2011, 11:23:05 pm
I don't know what the problem is, but I think you could open an Issue (link at the top of this page) and describe the problem there, and then the team will look at it.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Sync member - roles error
December 25, 2011, 11:51:12 pm

these modules are community maintained and supported. So we encourage you to investigate and patch the code OR if you dont have development skills hire someone to do the needed investigation.

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

msn

  • I post frequently
  • ***
  • Posts: 152
  • Karma: 6
  • Please talk to the other site
Re: Sync member - roles error
December 28, 2011, 01:01:07 pm
I don't have the skills or money to hire someone, Lobo is asking.
So, ending without a sollution for member sync ....

I made a different approach: made a group for members, put member in the group with a profile setting and synchronised it with CiviGroup Roles Sync. Still testing.
 
Hershel, thanks for your help, I appreciated.
« Last Edit: December 28, 2011, 01:25:10 pm by msn »

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Discussion (deprecated) »
  • Alpha and Beta Release Testing »
  • 4.1 Release Testing (Moderator: Kurund Jalmi) »
  • Sync member - roles error

This forum was archived on 2017-11-26.