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 CiviContribute (Moderator: Donald Lobo) »
  • CiviContribute DB Error
Pages: [1]

Author Topic: CiviContribute DB Error  (Read 1673 times)

FredJones

  • Guest
CiviContribute DB Error
November 13, 2007, 01:41:14 am
I made a new donation page in my Drupal CiviCRM 1.9 PHP5 site but when we submit now we get this:

Code: [Select]
Sorry. A non-recoverable error has occurred.

Database Error Code: Duplicate entry '0-1' for key 2, 1062

Return to home page.

Error Details:


Array
(
    [callback] => Array
        (
            [0] => CRM_Core_Error
            [1] => handle
        )

    [code] => -5
    [message] => DB Error: already exists
    [mode] => 16
    [debug_info] => INSERT INTO civicrm_contribution (domain_id , contact_id , contribution_type_id , contribution_page_id , payment_instrument_id , receive_date , non_deductible_amount , total_amount , currency , net_amount , trxn_id , invoice_id , source , amount_level , contribution_status_id ) VALUES ( 1 ,  3513 ,  1 ,  1 ,  1 ,  20071113041822 ,  0.00 ,  720 , 'USD' ,  720 , '0' , 'f099f4678ee949065141932dc1f849b7' , 'Online Contribution: Donate to Beit Natan' ,  NULL ,  1 )  [nativecode=1062 ** Duplicate entry '0-1' for key 2]
    [type] => DB_Error
    [user_info] => INSERT INTO civicrm_contribution (domain_id , contact_id , contribution_type_id , contribution_page_id , payment_instrument_id , receive_date , non_deductible_amount , total_amount , currency , net_amount , trxn_id , invoice_id , source , amount_level , contribution_status_id ) VALUES ( 1 ,  3513 ,  1 ,  1 ,  1 ,  20071113041822 ,  0.00 ,  720 , 'USD' ,  720 , '0' , 'f099f4678ee949065141932dc1f849b7' , 'Online Contribution: Donate to Beit Natan' ,  NULL ,  1 )  [nativecode=1062 ** Duplicate entry '0-1' for key 2]
    [to_string] => [db_error: message="DB Error: already exists" code=-5 mode=callback callback=CRM_Core_Error::handle prefix="" info="INSERT INTO civicrm_contribution (domain_id , contact_id , contribution_type_id , contribution_page_id , payment_instrument_id , receive_date , non_deductible_amount , total_amount , currency , net_amount , trxn_id , invoice_id , source , amount_level , contribution_status_id ) VALUES ( 1 ,  3513 ,  1 ,  1 ,  1 ,  20071113041822 ,  0.00 ,  720 , 'USD' ,  720 , '0' , 'f099f4678ee949065141932dc1f849b7' , 'Online Contribution: Donate to Beit Natan' ,  NULL ,  1 )  [nativecode=1062 ** Duplicate entry '0-1' for key 2]"]
)

Key 2 appears to be:

Code: [Select]
  UNIQUE KEY `UI_contrib_trxn_id_domain_id` (`trxn_id`,`domain_id`),

and indeed the values for those in the above INSERT are 1,0 and indeed we have a record with those values--my initial attempt (perhaps attempts) to submit worked. Now they fail. I am using Authorize.net in TEST mode and I believe that is the issue. But that certainly shouldn't cause CiviCRM to die--it makes testing a bit difficult. :(

Any ideas?

PS: "Send an Email" from an Individual Contact page works fine, in case anyone was going to ask that. Thus SMTP seems fine.[/code]

FredJones

  • Guest
Re: CiviContribute DB Error
November 13, 2007, 07:51:44 am
Switched Authorize.net to LIVE mode and it works fine now.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • CiviContribute DB Error

This forum was archived on 2017-11-26.