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 CiviMember (Moderator: Deepak Srivastava) »
  • Drupal civicrm_member_roles module not syncing roles
Pages: [1]

Author Topic: Drupal civicrm_member_roles module not syncing roles  (Read 906 times)

edc1

  • I’m new here
  • *
  • Posts: 28
  • Karma: 0
  • CiviCRM version: 4.2.6
  • CMS version: Drupal 6
  • MySQL version: 5.1
  • PHP version: 5.3
Drupal civicrm_member_roles module not syncing roles
August 31, 2012, 11:55:14 am
Hi,

we're using the Druapl civicrm_member_roles module to update a users Drupal role when their membership status changes. We have it set to 'Synchronize when membership is updated'. This works fine if and admin changes a Contacts membership in CiviCRM. The corresponding Drupal role gets assigned to the user account in Drupal. It fails when the user renews their own membership through a contribution page though. The membership status gets updated in CiviCRM but the sync to Drupal never happens.

When the user renews I see these calls that hit the civicrm_member_roles_civicrm_post funtion:

edit
Address

edit
Individual

edit
Profile

create
Contribution

create
LineItem

create
MembershipPayment


but no object name of "Membership" ever gets to this function so the sync isn't running.

This seems like a bug to me. Even if I change the function to check for if "MembershipPayment" as well as "Membership" it fails. That's because when a normal user renews their membership the $objref variable passed to the civicrm_member_roles_civicrm_post contains no contact_id so the function doesn't know what to sync. Maybe this is a permissions thing?

I'd be grateful for any pointers on how to fix this.

Thanks.

Em.

edc1

  • I’m new here
  • *
  • Posts: 28
  • Karma: 0
  • CiviCRM version: 4.2.6
  • CMS version: Drupal 6
  • MySQL version: 5.1
  • PHP version: 5.3
Re: Drupal civicrm_member_roles module not syncing roles
September 01, 2012, 02:58:18 am
So the problem is that hook_civicrm_post in the civicrm_member_roles module isn't getting called when the membership is updated when a contact renews their membership. Should I raise this as a bug on the issue tracker?

Em.

edc1

  • I’m new here
  • *
  • Posts: 28
  • Karma: 0
  • CiviCRM version: 4.2.6
  • CMS version: Drupal 6
  • MySQL version: 5.1
  • PHP version: 5.3
Re: Drupal civicrm_member_roles module not syncing roles
September 02, 2012, 04:40:56 am
Any idea which file the missing hook call should be added to? These both look like candidates:

CRM/Member/Form/MembershipRenewal.php
CRM/Member/BAO/Membership.php

Thanks.

Em.

Vince_in_Kentucky

  • I’m new here
  • *
  • Posts: 1
  • Karma: 0
  • CiviCRM version: 4.2.6
  • CMS version: Drupal 7.18
  • MySQL version: Ver 14.14 Distrib 5.1.63
  • PHP version: PHP 5.3.16-1
Re: Drupal civicrm_member_roles module not syncing roles
January 01, 2013, 12:04:46 pm
Did someone get this figured out?
What do you do about and the failure of CiviCRM to create a Drupal  user
with an associated error Notice:

"Notice: Trying to get property of non-object in CRM_Member_BAO_Membership->postProcessMembership() (line 1225 of /home/example/www/sites/all/modules/civicrm/CRM/Member/BAO/Membership.php)..."

Any comments appreciated...

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: Drupal civicrm_member_roles module not syncing roles
January 02, 2013, 08:06:20 am

dont think so. if u can investigate that would be great

u can ping us on irc if u need help getting started

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

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMember (Moderator: Deepak Srivastava) »
  • Drupal civicrm_member_roles module not syncing roles

This forum was archived on 2017-11-26.