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) »
  • After upgrade 2.1x on Dru, Membership Renewal form has DB error..fix? [updated]
Pages: [1]

Author Topic: After upgrade 2.1x on Dru, Membership Renewal form has DB error..fix? [updated]  (Read 1539 times)

CiviTeacher.com

  • I live on this forum
  • *****
  • Posts: 1282
  • Karma: 118
    • CiviTeacher
  • CiviCRM version: 3.4 - 4.5
  • CMS version: Drupal 6&7, Wordpress
  • MySQL version: 5.1 - 5.5
  • PHP version: 5.2 - 5.4
After upgrade 2.1x on Dru, Membership Renewal form has DB error..fix? [updated]
January 30, 2009, 10:49:05 am
We upgraded last month from Drupal 5/2.0.5 to Drupal 6/2.1.

Now our member registration form is generating and error for both new and renewing members.   What can I do to fix this issue?
You can view the page yourself at: http://www.nscss.org/civicrm/contribute/transact?reset=1&id=1
Please note you must fill out the form and submit for the error to occur...

This is the backtrace error code:

Code: [Select]
/home/nscss/public_html/sites/all/modules/civicrm/CRM/Core/Error.php, backtrace, 138
, handle,
/home/nscss/public_html/sites/all/modules/civicrm/packages/PEAR.php, call_user_func, 912
/home/nscss/public_html/sites/all/modules/civicrm/packages/DB.php, PEAR_Error, 966
/home/nscss/public_html/sites/all/modules/civicrm/packages/PEAR.php, DB_Error, 574
/home/nscss/public_html/sites/all/modules/civicrm/packages/DB/common.php, raiseError, 1903
/home/nscss/public_html/sites/all/modules/civicrm/packages/DB/mysql.php, raiseError, 898
/home/nscss/public_html/sites/all/modules/civicrm/packages/DB/mysql.php, mysqlRaiseError, 327
/home/nscss/public_html/sites/all/modules/civicrm/packages/DB/common.php, simpleQuery, 1216
/home/nscss/public_html/sites/all/modules/civicrm/packages/DB/DataObject.php, query, 2394
/home/nscss/public_html/sites/all/modules/civicrm/packages/DB/DataObject.php, _query, 1039
/home/nscss/public_html/sites/all/modules/civicrm/CRM/Core/DAO.php, insert, 279
/home/nscss/public_html/sites/all/modules/civicrm/CRM/Member/BAO/MembershipLog.php, save, 56
/home/nscss/public_html/sites/all/modules/civicrm/CRM/Member/BAO/Membership.php, add, 1242
/home/nscss/public_html/sites/all/modules/civicrm/CRM/Member/BAO/Membership.php, fixMembershipStatusBeforeRenew, 1029
/home/nscss/public_html/sites/all/modules/civicrm/CRM/Member/BAO/Membership.php, renewMembership, 941
/home/nscss/public_html/sites/all/modules/civicrm/CRM/Contribute/Form/Contribution/Confirm.php, postProcessMembership, 463
/home/nscss/public_html/sites/all/modules/civicrm/CRM/Core/Form.php, postProcess, 247
/home/nscss/public_html/sites/all/modules/civicrm/CRM/Core/StateMachine.php, mainProcess, 166
/home/nscss/public_html/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Next.php, perform, 63
/home/nscss/public_html/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php, perform, 203
/home/nscss/public_html/sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php, handle, 103
/home/nscss/public_html/sites/all/modules/civicrm/CRM/Core/Controller.php, handle, 232
/home/nscss/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php, run, 197
/home/nscss/public_html/sites/all/modules/civicrm/drupal/civicrm.module, invoke, 315
, civicrm_invoke,
/home/nscss/public_html/includes/menu.inc, call_user_func_array, 348
/home/nscss/public_html/index.php, menu_execute_active_handler, 18

This is the page error code

Code: [Select]
Sorry. A non-recoverable error has occurred.
DB Error: constraint violation
Database Error Code: Cannot add or update a child row: a foreign key constraint fails (`nscss_civicrm/civicrm_membership_log`, CONSTRAINT `FK_civicrm_memb
Return to home page.

Code: [Select]
Array
(
[callback] => Array
(
[0] => CRM_Core_Error
[1] => handle
)
[code] => -3
[message] => DB Error: constraint violation
[mode] => 16
[debug_info] => INSERT INTO civicrm_membership_log (membership_id , start_date , end_date , modified_id , modified_date , renewal_
[type] => DB_Error
[user_info] => INSERT INTO civicrm_membership_log (membership_id , start_date , end_date , modified_id , modified_date , renewal_r
[to_string] => [db_error: message="DB Error: constraint violation" code=-3 mode=callback callback=CRM_Core_Error::handle prefix=""
)
[/code]
« Last Edit: February 05, 2009, 07:01:48 pm by Stoob »
Try CiviTeacher: the online video tutorial CiviCRM learning library.

Deepak Srivastava

  • Moderator
  • Ask me questions
  • *****
  • Posts: 677
  • Karma: 65
Re: After upgrade to 2.1x on Drupal, Membership Registration form has DB error..
January 30, 2009, 11:45:53 am
Stoob,
Could you send us your 2.1 db to: deepak at webaccess.co.in ? Would help us figure out the exact problem/fix.

Deepak
« Last Edit: January 30, 2009, 11:51:52 am by Dave Greenberg »
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

CiviTeacher.com

  • I live on this forum
  • *****
  • Posts: 1282
  • Karma: 118
    • CiviTeacher
  • CiviCRM version: 3.4 - 4.5
  • CMS version: Drupal 6&7, Wordpress
  • MySQL version: 5.1 - 5.5
  • PHP version: 5.2 - 5.4
Re: After upgrade to 2.1x on Drupal, Membership Registration form has DB error..
February 03, 2009, 09:38:02 am
Thank you for your continued efforts.   I am able now to regenerate the error.  It appears that Drupal users who had accounts created prior to our migration to D6 and CiviCRM 2.1 cannot renew their memberships without a database error.

Interestingly, users who were created after the D6/Civi2.1 migration are able to successfully renew memberships.

How to duplicate:
At www.nscss.org you are welcome to login and create a new membership by clicking "Join" in the top green menu.  Select a membership level and "create Drupal account".  You can get to the Google checkout screen - you do not need to pay $, if you can see the GoogleCheckout screen you have gone far enough.

Now use this user with an account created prior to the D6 Migration.  I have sent his username/password to your private email.

Login as him at www.nscss.org and click "Join".  Click continue, then click the GoogleCheckout button on the confirmation page.  You will now see the error.

Please help us to determine the problem and fix, thank you SO much!

« Last Edit: February 04, 2009, 12:28:30 pm by Stoob »
Try CiviTeacher: the online video tutorial CiviCRM learning library.

CiviTeacher.com

  • I live on this forum
  • *****
  • Posts: 1282
  • Karma: 118
    • CiviTeacher
  • CiviCRM version: 3.4 - 4.5
  • CMS version: Drupal 6&7, Wordpress
  • MySQL version: 5.1 - 5.5
  • PHP version: 5.2 - 5.4
Re: After upgrade 2.1x on Dru, Membership Renewal form has DB error..fix? [updated]
February 06, 2009, 11:57:17 am
Further UPDATE:

Inexplicably the renewal process started working for "older" members again today.  Three renewals have been processed.  I can think of nothing that was done to change the configuration of CiviCRM or GoogleCheckout in the last 24 hours. 

I *swear* that this error was occurring, and can find no good reason why it stopped occurring.

This is a PDF screencapture of the error taking place:

http://www.nscss.org/registration%20error.pdf
« Last Edit: February 07, 2009, 02:09:19 pm by Stoob »
Try CiviTeacher: the online video tutorial CiviCRM learning library.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMember (Moderator: Deepak Srivastava) »
  • After upgrade 2.1x on Dru, Membership Renewal form has DB error..fix? [updated]

This forum was archived on 2017-11-26.