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 »
  • Installing CiviCRM »
  • Joomla! Installations (Moderator: Deepak Srivastava) »
  • DB Error: constraint violation
Pages: [1]

Author Topic: DB Error: constraint violation  (Read 1550 times)

karter

  • Guest
DB Error: constraint violation
July 29, 2010, 11:37:01 pm
DB Error: constraint violation

Database Error Code: Cannot add or update a child row: a foreign key constraint fails (`284332`.`civicrm_uf_match`, CONSTRAINT `FK_civicrm_uf_match_domain_id` FOREIGN KEY (`domain_id`) REFERENCES `civicrm_domain` (`id`)), 1452

Return to home page.
Error Details:


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

       
Code: [Select]
=> -3
    [message] => DB Error: constraint violation
    [mode] => 16
    [debug_info] => INSERT INTO civicrm_uf_match (domain_id , uf_id , uf_name , contact_id ) VALUES ( 1 ,  62 , 'email@example.com' ,  3 )  [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`284332`.`civicrm_uf_match`, CONSTRAINT `FK_civicrm_uf_match_domain_id` FOREIGN KEY (`domain_id`) REFERENCES `civicrm_domain` (`id`))]
    [type] => DB_Error
    [user_info] => INSERT INTO civicrm_uf_match (domain_id , uf_id , uf_name , contact_id ) VALUES ( 1 ,  62 , 'email@example.com' ,  3 )  [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`284332`.`civicrm_uf_match`, CONSTRAINT `FK_civicrm_uf_match_domain_id` FOREIGN KEY (`domain_id`) REFERENCES `civicrm_domain` (`id`))]
    [to_string] => [db_error: message="DB Error: constraint violation" code=-3 mode=callback callback=CRM_Core_Error::handle prefix="" info="INSERT INTO civicrm_uf_match (domain_id , uf_id , uf_name , contact_id ) VALUES ( 1 ,  62 , 'email@example.com' ,  3 )  [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`284332`.`civicrm_uf_match`, CONSTRAINT `FK_civicrm_uf_match_domain_id` FOREIGN KEY (`domain_id`) REFERENCES `civicrm_domain` (`id`))]"]
)

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: DB Error: constraint violation
July 30, 2010, 04:25:15 am
Can you describe steps that lead you to 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!

adshill

  • I post occasionally
  • **
  • Posts: 96
  • Karma: 8
Re: DB Error: constraint violation
August 19, 2010, 06:28:47 pm
I get exactly the same error after setting up a multi-site installation. Works fine on my main host site but the secondary site doesn't function at all, just this fatal error.

Did you find out why it was happening for you? Have cleared cache's, logged in, logged out, manually tried to add the line of values given in the error (which gives the same error in my mysql tool).

Stuck :(

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • Joomla! Installations (Moderator: Deepak Srivastava) »
  • DB Error: constraint violation

This forum was archived on 2017-11-26.