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) »
  • Renewing lifetime membership causes receipting to barf
Pages: [1]

Author Topic: Renewing lifetime membership causes receipting to barf  (Read 517 times)

JonGold

  • Ask me questions
  • ****
  • Posts: 638
  • Karma: 81
    • Palante Technology
  • CiviCRM version: 4.1 to the latest
  • CMS version: Drupal 6-7, Wordpress 4.0+
  • PHP version: PHP 5.3-5.5
Renewing lifetime membership causes receipting to barf
April 11, 2014, 02:04:21 pm
I have a client whose membership signup page allows you to join a number of committees.  Some of the committees are free, some cost money.  In the current scheme, a membership for a non-free committee lasts a year, free memberships are set up as lifetime memberships.

The issue comes when someone attempts to renew their membership and checks the box to renew a lifetime membership.  The transaction goes through, but the error below occurs.

So the question is - should there ever be a situation in which a lifetime membership is renewed?  If not, we shouldn't attempt to renew lifetime memberships.

[Techie stuff]
The issue is that CRM_Member_BAO_Membership::renewMembership function is passing off to CRM_Member_BAO_Membership::fixMembershipStatusBeforeRenew, which requires an end date - and lifetime memberships have no end dates.

I could submit a patch that would put lifetime memberships in the same category as Pending/Cancelled memberships (CRM/Member/BAO/Membership.php, line 1568 on Civi 4.4.4), but I'd like to get some feedback from folks as to whether I'm missing how others use lifetime memberships before proceeding. 


Code: [Select]
Apr 05 00:34:48 [info] $Fatal Error Details = Array
(
[message] => Oops, it looks like there is no valid membership status
corresponding to the membership start and end dates for this membership.
Contact the site administrator for assistance.
[code] =>
)

Apr 05 00:34:48 [info] $backTrace = #0
/home/members/nlg/sites/nlg.org/web/sites/all/modules/civicrm/CRM/Core/Error.php(315):
CRM_Core_Error::backtrace("backTrace", TRUE)
#1
/home/members/nlg/sites/nlg.org/web/sites/all/modules/civicrm/CRM/Member/BAO/Membership.php(1795):
CRM_Core_Error::fatal("Oops, it looks like there is no valid membership
status corresponding to the ...")
#2
/home/members/nlg/sites/nlg.org/web/sites/all/modules/civicrm/CRM/Member/BAO/Membership.php(1581):
CRM_Member_BAO_Membership::fixMembershipStatusBeforeRenew((Array:14),
"20140405003448")
#3
/home/members/nlg/sites/nlg.org/web/sites/all/modules/civicrm/CRM/Member/BAO/Membership.php(1343):
CRM_Member_BAO_Membership::renewMembership("29750", "25", FALSE,
Object(CRM_Contribute_Form_Contribution_Confirm), NULL, "29750",
(Array:0), 1)
#4
/home/members/nlg/sites/nlg.org/web/sites/all/civicrm/CRM/Contribute/Form/Contribution/Confirm.php(929):
CRM_Member_BAO_Membership::postProcessMembership((Array:71), "29750",
Object(CRM_Contribute_Form_Contribution_Confirm), (Array:60), (Array:0),
(Array:0))
#5
/home/members/nlg/sites/nlg.org/web/sites/all/modules/civicrm/CRM/Core/Form.php(246):
CRM_Contribute_Form_Contribution_Confirm->postProcess()
#6
/home/members/nlg/sites/nlg.org/web/sites/all/modules/civicrm/CRM/Core/StateMachine.php(160):
CRM_Core_Form->mainProcess()
#7
/home/members/nlg/sites/nlg.org/web/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Next.php(60):
CRM_Core_StateMachine->perform(Object(CRM_Contribute_Form_Contribution_Confirm),
"next", "Next")
#8
/home/members/nlg/sites/nlg.org/web/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php(203):
CRM_Core_QuickForm_Action_Next->perform(Object(CRM_Contribute_Form_Contribution_Confirm),
"next")
#9
/home/members/nlg/sites/nlg.org/web/sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php(103):
HTML_QuickForm_Controller->handle(Object(CRM_Contribute_Form_Contribution_Confirm),
"next")
#10
/home/members/nlg/sites/nlg.org/web/sites/all/modules/civicrm/CRM/Core/Controller.php(316):
HTML_QuickForm_Page->handle("next")
#11
/home/members/nlg/sites/nlg.org/web/sites/all/modules/civicrm/CRM/Core/Invoke.php(292):
CRM_Core_Controller->run((Array:3), NULL)
#12
/home/members/nlg/sites/nlg.org/web/sites/all/modules/civicrm/CRM/Core/Invoke.php(70):
CRM_Core_Invoke::runItem((Array:15))
#13
/home/members/nlg/sites/nlg.org/web/sites/all/modules/civicrm/CRM/Core/Invoke.php(52):
CRM_Core_Invoke::_invoke((Array:3))
#14
/home/members/nlg/sites/nlg.org/web/sites/all/modules/civicrm/drupal/civicrm.module(436):
CRM_Core_Invoke::invoke((Array:3))
#15 [internal function](): civicrm_invoke("contribute", "transact")
#16 /usr/local/share/drupal-7.26/includes/menu.inc(517):
call_user_func_array("civicrm_invoke", (Array:2))
#17 /usr/local/share/drupal-7.26/index.php(21):
menu_execute_active_handler()
#18 {main}
Sign up to StackExchange and get free expert CiviCRM advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Renewing lifetime membership causes receipting to barf
April 11, 2014, 02:05:43 pm
afaik lifetime should never be renewed/renewable - i am talking civicrm here not metaphysically ;-)
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMember (Moderator: Deepak Srivastava) »
  • Renewing lifetime membership causes receipting to barf

This forum was archived on 2017-11-26.