Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-9758

Fix warnings and notices when running Update Membership Statuses and Send Renewal Reminders job

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.1.0
    • Fix Version/s: 4.1.1
    • Component/s: CiviMember
    • Labels:
      None

      Description

      When running Update Membership Statuses and Send Renewal Reminders job (process_memberships) - IF one or more memberships is due to get a renewal reminder the following warnings / notices are being thrown:

      • Notice: Undefined variable: config in CRM_Member_BAO_Membership::updateAllMembershipStatus() (line 2491 of /Users/dgg/svn/crm_v4.1/CRM/Member/BAO/Membership.php).
      • Notice: Trying to get property of non-object in CRM_Member_BAO_Membership::updateAllMembershipStatus() (line 2491 of /Users/dgg/svn/crm_v4.1/CRM/Member/BAO/Membership.php).
      • Warning: Cannot use a scalar value as an array in CRM_Member_BAO_Membership::updateAllMembershipStatus() (line 2537 of /Users/dgg/svn/crm_v4.1/CRM/Member/BAO/Membership.php).
      • Warning: Cannot use a scalar value as an array in CRM_Member_BAO_Membership::updateAllMembershipStatus() (line 2538 of /Users/dgg/svn/crm_v4.1/CRM/Member/BAO/Membership.php).

      This causes the result message in the Job log to NOT include the statuses it should have, so you see just "Success()" instead of "Success (Processed 38 membership records. Updated 0 records. Sent 1 renewal reminders.)"

      However, I was NOT able to reproduce the issue reported below with the reminder being sent multiple times. The behavior I observed was as expected:

      • civicrm_membership.reminder_date is set to NULL when a reminder is sent
      • an activity record of type "Membership Renewal Reminder" is inserted for the contact (show up in Activities tab).

      The code does NOT insert or update a membership_log record when reminders are sent, only when membership status is updated.

      ---- Original Post ---------
      This related to forum topic http://forum.civicrm.org/index.php/topic,23588.0.html

      I'm using 4.1 in a Drupal 6 install.

      When the system sends out membership reminders it does not seem to record this in the civicrm_membership_log table.

      As it does not know its sent a reminder out, it keeps sending out the reminders.

      Ive done this on two complete new installs and the problem remains.

      It also generates an error message on my cron alters and a drupal error message on the site.

      These errors are repeatable on the civi demo site ( please see the forum link for details).

        Attachments

          Activity

            People

            • Assignee:
              dgg David Greenberg
              Reporter:
              tonyhrx Tony Horrocks
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: