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

foreign key error updating contribution (after updating to civi1.6)

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      After updating from civicrm 1.5 (on previous server: php 4 and mysql 4.1) to civicrm 1.6 (new server, php5 and mysql5 apache2) everything is working (as far I think) except updating contact-contributions.

      I followed the upgrade instructions from the mailingslist because of mysql5. The instructions where for the same case as I'm in, php4/mysql4.1 to php5/mysql5

      I'm using a Dutch version of civicrm...:

      onherstelbare fout
      Sorry, er is een onherstelbare fout opgetreden.

      Database foutcode : Cannot add or update a child row: a foreign key constraint fails (`democratie_nu/civicrm_contribution`, CONSTRAINT `civicrm_contribution_ibfk_4` FOREIGN KEY (`payment_instrument_id`) REFERENCES `civicrm_payment_instrument` (`id`)), 1452

      Terug naar CiviCRM menu.

      Error Details:

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

      [code] => -1
      [message] => DB Error: unknown error
      [mode] => 16
      [debug_info] => INSERT INTO civicrm_contribution (domain_id , contact_id , contribution_type_id , payment_instrument_id , receive_date , non_deductible_amount , total_amount , fee_amount , net_amount , trxn_id , invoice_id , currency , cancel_reason , source , note , honor_contact_id ) VALUES ( 1 , 1439 , 4 , 5 , 20070206000000 , NULL , 15 , NULL , NULL , NULL , NULL , 'EUR' , NULL , NULL , NULL , NULL ) [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`democratie_nu/civicrm_contribution`, CONSTRAINT `civicrm_contribution_ibfk_4` FOREIGN KEY (`payment_instrument_id`) REFERENCES `civicrm_payment_instrument` (`id`))]
      [type] => DB_Error
      [user_info] => INSERT INTO civicrm_contribution (domain_id , contact_id , contribution_type_id , payment_instrument_id , receive_date , non_deductible_amount , total_amount , fee_amount , net_amount , trxn_id , invoice_id , currency , cancel_reason , source , note , honor_contact_id ) VALUES ( 1 , 1439 , 4 , 5 , 20070206000000 , NULL , 15 , NULL , NULL , NULL , NULL , 'EUR' , NULL , NULL , NULL , NULL ) [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`democratie_nu/civicrm_contribution`, CONSTRAINT `civicrm_contribution_ibfk_4` FOREIGN KEY (`payment_instrument_id`) REFERENCES `civicrm_payment_instrument` (`id`))]
      [to_string] => [db_error: message="DB Error: unknown error" code=-1 mode=callback callback=CRM_Core_Error::handle prefix="" info="INSERT INTO civicrm_contribution (domain_id , contact_id , contribution_type_id , payment_instrument_id , receive_date , non_deductible_amount , total_amount , fee_amount , net_amount , trxn_id , invoice_id , currency , cancel_reason , source , note , honor_contact_id ) VALUES ( 1 , 1439 , 4 , 5 , 20070206000000 , NULL , 15 , NULL , NULL , NULL , NULL , 'EUR' , NULL , NULL , NULL , NULL ) [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`democratie_nu/civicrm_contribution`, CONSTRAINT `civicrm_contribution_ibfk_4` FOREIGN KEY (`payment_instrument_id`) REFERENCES `civicrm_payment_instrument` (`id`))]"]
      )

        Attachments

          Activity

            People

            • Assignee:
              dgg David Greenberg
              Reporter:
              denis Denis Clijsters
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: