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) »
  • CiviCRM 3.0, Error running UpdateMembershipRecord.php
Pages: [1]

Author Topic: CiviCRM 3.0, Error running UpdateMembershipRecord.php  (Read 1819 times)

dunning

  • I’m new here
  • *
  • Posts: 12
  • Karma: 0
CiviCRM 3.0, Error running UpdateMembershipRecord.php
January 04, 2010, 08:59:23 am
I have the routine running with the userid and password specified.  I get the same error running it under both wget and Firefox.

I am not sure I have ever run this under 3.0.  Based on a comment I found elsewhere in the forums I added the membership status 'Deceased' with a key of 8, since I already had seven membership statuses.  I put that status at the top of the list.  That status seems to update correctly.  I have found others that were not updated ('grace' for instance).  Here is the output returned.

Updating ...
Fatal error: Call to undefined function module_exists() in /home/advancedtransit/advancedtransit.net/sites/all/modules/civicrm/CRM/Core/BAO/Navigation.php on line 464


There are actually well over 200 dots, but this software removes all but three.

The php code at that line says:
            if ( ( $config->userFramework == 'Drupal' ) && module_exists('admin_menu') ) {

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: CiviCRM 3.0, Error running UpdateMembershipRecord.php
January 04, 2010, 10:36:08 am
This is already fixed in 3.0.x stable release and upgrade should solve your problem.
Kurund
Found this reply helpful? Support CiviCRM

dunning

  • I’m new here
  • *
  • Posts: 12
  • Karma: 0
Re: CiviCRM 3.0, Error running UpdateMembershipRecord.php
January 05, 2010, 01:02:14 am
I have upgraded to CiviCRM 3.0.3.  I am now getting the following message:

Updating ...

unrecoverable error
Sorry. A non-recoverable error has occurred.

We experienced an unexpected error. Please file an issue with the backtrace

Return to home page.


(I do not know how to get a backtrace if it does not just show up.)

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: CiviCRM 3.0, Error running UpdateMembershipRecord.php
January 05, 2010, 02:09:49 am
First revert back to older version, then enable backtrace: http://drupal.demo.civicrm.org/civicrm/admin/setting/debug&reset=1

Then try upgrade.

Kurund
Found this reply helpful? Support CiviCRM

dunning

  • I’m new here
  • *
  • Posts: 12
  • Karma: 0
Re: CiviCRM 3.0, Error running UpdateMembershipRecord.php
January 05, 2010, 02:49:03 am
The error happens during the UpdateMembershipRecord.php run.  I turned on backtrace per your instructions:

Updating ...

backTrace

/home/advancedtransit/advancedtransit.net/sites/all/modules/civicrm/CRM/Core/Error.php, backtrace, 256
/home/advancedtransit/advancedtransit.net/sites/all/modules/civicrm/CRM/Core/DAO.php, fatal, 707
/home/advancedtransit/advancedtransit.net/sites/all/modules/civicrm/CRM/Contact/BAO/Contact.php, getFieldValue, 559
/home/advancedtransit/advancedtransit.net/sites/all/modules/civicrm/CRM/Member/BAO/Membership.php, displayName, 330
/home/advancedtransit/advancedtransit.net/sites/all/modules/civicrm/api/v2/MembershipContact.php, create, 93
/home/advancedtransit/advancedtransit.net/sites/all/modules/civicrm/api/v2/Membership.php, civicrm_membership_contact_create, 93
/home/advancedtransit/advancedtransit.net/sites/all/modules/civicrm/bin/UpdateMembershipRecord.php, civicrm_contact_membership_create, 177
/home/advancedtransit/advancedtransit.net/sites/all/modules/civicrm/bin/UpdateMembershipRecord.php, updateMembershipStatus, 266

unrecoverable error
    Sorry. A non-recoverable error has occurred.

    We experienced an unexpected error. Please file an issue with the backtrace

    Return to home page.



Kiran Jagtap

  • Ask me questions
  • ****
  • Posts: 533
  • Karma: 51
Re: CiviCRM 3.0, Error running UpdateMembershipRecord.php
January 05, 2010, 04:26:34 am
I suspect this error is due to membership object do not have contact_id,

But don't know how this case comes in to picture ...

It would be helpful if you copy these lines to CRM/Member/BAO/Membership.php at line around 330 after self::createRelatedMemberships( $params, $membership ); line
Code: [Select]
        if ( empty( $membership->contact_id ) ) {
            crm_core_error::debug( 'params', $params );
            crm_core_error::debug( 'ids',    $ids );
            exit( );
        }

and let us know debug out put.

We will definitely going to write preventive code for this one, but I'm looking for edge case why this occurs.

thanks

kiran
You Are Designed To Choose... Defined By Choice.

dunning

  • I’m new here
  • *
  • Posts: 12
  • Karma: 0
Re: CiviCRM 3.0, Error running UpdateMembershipRecord.php
January 05, 2010, 04:52:24 am
Here is the output.  I think I could actually find this membership and try to destroy it, or something.  I would rather take your advice.

Updating ...

params

Array
(
    [membership_type_id] => 7
    [join_date] => 20060101
    [status_id] => 4
    [custom] => Array
        (
        )

    [contact_id] => 214
    [start_date] => 20060101
    [end_date] => 20061231
    [source] =>
    [skipStatusCal] => 1
    [action] => 2
    [is_override] => null
    [membership_id] => 32113
    [owner_membership_id] => 4
    [reminder_date] => null
)

ids

Array
(
    [membership] => 338
    [user_id] => 212
    [contribution] =>
)

dunning

  • I’m new here
  • *
  • Posts: 12
  • Karma: 0
Re: CiviCRM 3.0, Error running UpdateMembershipRecord.php
January 05, 2010, 05:01:50 am
This person no longer works for the organization that maintains the membership.  It is an organization membership rather than an individual membership, I think.  There is the possibility that the organization contact was merged with a duplicate organization record at some point in the last year or so.  That might not have handled the child memberships correctly, especially where the relation no longer existed.

Will it hurt anything if I just delete the membership from the front end?  Will it fix anything?  I have grown nervous about this.

dunning

  • I’m new here
  • *
  • Posts: 12
  • Karma: 0
Re: CiviCRM 3.0, Error running UpdateMembershipRecord.php
January 05, 2010, 05:23:48 am
I removed the outdated relationship from Dawn's records and also eighteen identical organizational memberships, apparently one for each time I ran the UpdateMembershipRecord.php routine.  I then had to remove a similar record from one of her former co-workers plus his (identical) organizational membership record.

The routine now runs without problems.

It is probably not a good idea to allow relations to have a time span if they continue to be processed after they are outdated.  I am just philosophizing. 

I will let you know if I find any further repercussions.

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: CiviCRM 3.0, Error running UpdateMembershipRecord.php
January 05, 2010, 07:05:28 am

hey kiran:

can you check and fix the code to ensure that we do not propagate the membership to expired or inactive relationships

thanx

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

Kiran Jagtap

  • Ask me questions
  • ****
  • Posts: 533
  • Karma: 51
Re: CiviCRM 3.0, Error running UpdateMembershipRecord.php
January 06, 2010, 02:45:39 am
Can you integrate this patch and let us know is it working for you.

Also this code will be part of next release.

thanks

kiran
You Are Designed To Choose... Defined By Choice.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMember (Moderator: Deepak Srivastava) »
  • CiviCRM 3.0, Error running UpdateMembershipRecord.php

This forum was archived on 2017-11-26.