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) »
  • UpdateMembershipRecord fails due to CiviMember Roles Sync
Pages: [1]

Author Topic: UpdateMembershipRecord fails due to CiviMember Roles Sync  (Read 693 times)

lufkind

  • I’m new here
  • *
  • Posts: 2
  • Karma: 0
  • CiviCRM version: 4.3.5
  • CMS version: Drupal 7.21
  • MySQL version: 5.5
  • PHP version: 5.3.13
UpdateMembershipRecord fails due to CiviMember Roles Sync
May 04, 2011, 03:21:10 pm
I'm receiving the same error as per http://forum.civicrm.org/index.php?topic=15180.0. When CiviMember Roles Sync is enabled, running UpdateMembershipRecord.php returns the following error:

Fatal error: require_once() [function.require]: Failed opening required '/CRM/Core/BAO/UFMatch.php' (include_path='/home/mysite/public_html/sites/all/civicrm/custom_php/:.:/home/mysite/public_html/sites/all/modules/civicrm/:/home/mysite/public_html/sites/all/modules/civicrm//packages:.:/usr/local/php5/lib/php') in /home/mysite/public_html/sites/all/modules/civicrm/drupal/modules/civicrm_member_roles/civicrm_member_roles.module on line 418

If CiviMember Roles Sync is disabled UpdateMembershipRecord runs correctly. It also runs correctly if the leading slash in line 418 of  civicrm_member_roles.module is removed:

original: require_once $civicrm_root . '/CRM/Core/BAO/UFMatch.php';

revised:require_once $civicrm_root . 'CRM/Core/BAO/UFMatch.php';

But the CiviMember Roles Sync does not work with the leading slash removed.

Is CiviMember Roles Sync implementing $civicrm_root incorrectly or is UpdateMembershipRecord? Or are they handled differently because one interacts with Drupal and one doesn't? And is there a solution?

Drupal 6.20, CiviCRM 3.3.2.

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: UpdateMembershipRecord fails due to CiviMember Roles Sync
May 04, 2011, 04:13:00 pm

did a quick check of the code and this has been fixed in 3.4.

try replacing that line with:

    require_once 'CRM/Core/BAO/UFMatch.php';

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

lufkind

  • I’m new here
  • *
  • Posts: 2
  • Karma: 0
  • CiviCRM version: 4.3.5
  • CMS version: Drupal 7.21
  • MySQL version: 5.5
  • PHP version: 5.3.13
Re: UpdateMembershipRecord fails due to CiviMember Roles Sync
May 04, 2011, 04:40:35 pm
Worked perfectly. Thanks. Haven't upgraded to 3.4 yet because I'm using the CiviEvent Discount module and haven't tested it yet for 3.4. Have you heard about any problems with it and 3.4?

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMember (Moderator: Deepak Srivastava) »
  • UpdateMembershipRecord fails due to CiviMember Roles Sync

This forum was archived on 2017-11-26.