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 »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • FK Constraint Problem
Pages: [1]

Author Topic: FK Constraint Problem  (Read 610 times)

qjensen

  • I post frequently
  • ***
  • Posts: 141
  • Karma: 11
    • Scaled Solutions
  • CiviCRM version: 4.5
  • CMS version: Drupal 7
  • MySQL version: 5.5
  • PHP version: 5.3
FK Constraint Problem
March 25, 2010, 03:42:34 pm
I just did a fresh install of CiviCRM on a site and I am getting the following error anytime I try to do anything

Code: [Select]
DB Error: constraint violation

Database Error Code: Cannot add or update a child row: a foreign key constraint fails (`members_civicrm1/civicrm_dashboard_contact`, CONSTRAINT `FK_civicrm_dashboard_contact_contact_id` FOREIGN KEY (`contact_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE CASCADE), 1452

I know what the problem is - my contact table is empty. The reason I am confused is that I have never run into this problem before.

Can I just manually add user id 1 to the contact database or is there something else going on?
Quint Jensen
Web Developer
Scaled Solutions
--" Remove the 'I want you to like me' notes from your forehead and place them where they truly will do the most good -- on your mirror!" Author Unknown

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: FK Constraint Problem
March 30, 2010, 09:58:51 am
Logging out of Drupal and logging back in should fix problems like this (CiviCRM should create a contact for your Drupal user when you log back in).
Protect your investment in CiviCRM by  becoming a Member!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • FK Constraint Problem

This forum was archived on 2017-11-26.