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 CiviEvent (Moderator: Yashodha Chaku) »
  • Error while registering in an event
Pages: [1]

Author Topic: Error while registering in an event  (Read 1750 times)

binoy

  • Guest
Error while registering in an event
August 26, 2008, 04:56:13 am
Hi friends,
Iam getting an error while registering for an event in civicrm.the error log is given below , can anybody help me.
Iam using drupal 5.7 and civicrm 2.0.5

Sorry. A non-recoverable error has occurred.
DB Error: unknown error
Database Error Code: Cannot add or update a child row: a foreign key constraint fails (`mydb_test/civicrm_financial_trxn`, CONSTRAINT `FK_civicrm_financial_trxn_contribution_id` FOREIGN KEY (`contribution_id`) REFERENCES `civicrm_contribution` (`id`) ON DELETE CASCADE), 1452

Return to home page.

Error Details:

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

       
Code: [Select]
=> -1
    [message] => DB Error: unknown error
    [mode] => 16
    [debug_info] => INSERT INTO civicrm_financial_trxn (domain_id , trxn_date , trxn_type , total_amount , net_amount , currency , payment_processor , trxn_id ) VALUES ( 1 ,  20080825103547 , 'Debit' ,  10 ,  10 , 'USD' , 'Dummy' , 'test00000005' )  [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`mydb_test/civicrm_financial_trxn`, CONSTRAINT `FK_civicrm_financial_trxn_contribution_id` FOREIGN KEY (`contribution_id`) REFERENCES `civicrm_contribution` (`id`) ON DELETE CASCADE)]
    [type] => DB_Error
    [user_info] => INSERT INTO civicrm_financial_trxn (domain_id , trxn_date , trxn_type , total_amount , net_amount , currency , payment_processor , trxn_id ) VALUES ( 1 ,  20080825103547 , 'Debit' ,  10 ,  10 , 'USD' , 'Dummy' , 'test00000005' )  [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`mydb_test/civicrm_financial_trxn`, CONSTRAINT `FK_civicrm_financial_trxn_contribution_id` FOREIGN KEY (`contribution_id`) REFERENCES `civicrm_contribution` (`id`) ON DELETE CASCADE)]
    [to_string] => [db_error: message="DB Error: unknown error" code=-1 mode=callback callback=CRM_Core_Error::handle prefix="" info="INSERT INTO civicrm_financial_trxn (domain_id , trxn_date , trxn_type , total_amount , net_amount , currency , payment_processor , trxn_id ) VALUES ( 1 ,  20080825103547 , 'Debit' ,  10 ,  10 , 'USD' , 'Dummy' , 'test00000005' )  [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`mydb_test/civicrm_financial_trxn`, CONSTRAINT `FK_civicrm_financial_trxn_contribution_id` FOREIGN KEY (`contribution_id`) REFERENCES `civicrm_contribution` (`id`) ON DELETE CASCADE)]"]
)
Feature[/b]

Michał Mach

  • Ask me questions
  • ****
  • Posts: 748
  • Karma: 59
    • CiviCRM site
  • CiviCRM version: latest
  • CMS version: Drupal and Joomla latest
  • MySQL version: numerous
  • PHP version: 5.3 and 5.2
Re: Error while registering in an event
August 26, 2008, 06:17:20 am
Hey,

Could you try to set up similar event registration page on http://drupal.demo.civicrm.org/ and try to reproduce this error?

Thx,
m
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

My absolute favourite: Wordpress Integration!.

Donate Now!

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Error while registering in an event
August 26, 2008, 06:29:53 am
Binoy:

Before posting It's always a good practice to search forum for similar errors, few links that might be helpful:

http://forum.civicrm.org/index.php/topic,2283.0.html
http://forum.civicrm.org/index.php/topic,3760.0.html

HTH

Kurund

Found this reply helpful? Support CiviCRM

binoy

  • Guest
Re: Error while registering in an event
August 26, 2008, 07:00:26 am
Hi Friend,
Thanks for replaying me.
the error that i posted is getting when iam doing the test registration. for test registration iam using a dummy payment.iam not using other payment gateways. then it may not be the problem with authorized.net . right

Quote from: Kurund Jalmi on August 26, 2008, 06:29:53 am
Binoy:

Before posting It's always a good practice to search forum for similar errors, few links that might be helpful:

http://forum.civicrm.org/index.php/topic,2283.0.html
http://forum.civicrm.org/index.php/topic,3760.0.html

HTH

Kurund



binoy

  • Guest
Re: Error while registering in an event
August 26, 2008, 07:18:06 am
Hi friend,
I create a event in  http://drupal.demo.civicrm.org/ with name new event for the demo, also registered in the same with a email id, it was a a successful registration. I didn't get the error from that, can u tell me what may be the problem with mine installation. i pasted the sql query in phpmysql ,that outputed in the error log , there also iam getting same error that foreign key contraints.

Iam using drupal 5.7 and civicrm 2.0.5

Quote from: Michał Mach on August 26, 2008, 06:17:20 am
Hey,

Could you try to set up similar event registration page on http://drupal.demo.civicrm.org/ and try to reproduce this error?

Thx,
m
« Last Edit: August 26, 2008, 07:23:10 am by binoy »

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Error while registering in an event
August 26, 2008, 09:40:10 am
Binoy:

Can you follow this:

1. First delete all test participant records.

2. Empty civicrm_financial_trxn table.

HTH

Kurund
Found this reply helpful? Support CiviCRM

binoy

  • Guest
Re: Error while registering in an event
August 27, 2008, 07:01:05 am
Hi Friends,
Thanks for your help, Now the registration is working without giving any error,

I think the following procedure gives me the result
1. First delete all test participant records.
2. Empty civicrm_financial_trxn table.
 then i created new event and joined in that event , then i didn't get any error from there.
Thanks freinds.

Binoy

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Error while registering in an event

This forum was archived on 2017-11-26.