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

Cannot renew expired fixed month duration membership

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Fixed/Completed
    • Affects Version/s: 3.3.5
    • Fix Version/s: 3.4.beta
    • Component/s: CiviMember
    • Labels:
      None

      Description

      Attempting to renew an expired membership that is multi-month, fixed period results in the following error: "The membership cannot be saved. No valid membership status for given dates."

      This can be reproduced on the Drupal demo site as follows:
      Configure a new membership with 13 month duration and fixed period.
      Add a new membership for a contact with a Join date 2009-12-15.
      The resulting membership is 2009-12-01 to 2010-12-31 (expired).
      Renew this membership on any date as long as the renewal date month is less than 12.
      The above error message is displayed.

      If an ordinary user attempts to renew the membership through a contribution page, they receive an error "Access denied" because the code attempts to redirect to the contact view page when the error occurs (the contact view page is only available to the administrator).

      This error only occurs when the start date month is greater than the renewal date month.

      The error is in CRM_Member_BAO_MembershipType::getRenewalDatesForMembershipType() where the code attempts to adjust the new start date according to the rollover window. Rollover only applies to fixed year periods, and not fixed month periods. The code uses NULL values from the database for fixed_period_start_day and fixed_period_rollover_day which leads to the problem.

        Attachments

          Activity

            People

            • Assignee:
              ashwini Ashwini Poharkar
              Reporter:
              marty Marty Wright
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: