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 Import (Moderator: Yashodha Chaku) »
  • Constraint Violation Error when matching on non-existing CiviCRM ID
Pages: [1]

Author Topic: Constraint Violation Error when matching on non-existing CiviCRM ID  (Read 620 times)

Fabian_SYSTOPIA

  • I post occasionally
  • **
  • Posts: 74
  • Karma: 3
  • CiviCRM version: 4.3.x, 4.4.x
  • CMS version: Drupal 7.x
  • MySQL version: 5.4.10
  • PHP version: 5.4.10
Constraint Violation Error when matching on non-existing CiviCRM ID
March 31, 2014, 04:44:21 am
Dear All,

I get a constraint violation error (both on local 4.4.3 installation and the official 4.4.4 drupal demo) when I try to do the following:

My csv-file contains the columns "Civi ID", First Name, "Last Name" and some Adress Fields such as "Street".

In the import contact screen I select the csv-file, "First row contains column headers", "contact type: individual", "For Duplictae Contact: update" and any dedupe rule (e.g. Name and Email).

I match the columns (Civi ID, First Name and Last name to the corresponding fields in CiviCRM)

When I try to import a contact with a CiviCRM ID that does not exist (because it was deleted between exportig the contact's date and trying to re-import it) I get the following error:

DB Error: constraint violation

In addition, I get the following error when I continue to the home page:

Notice: Undefined index: 54559 in CRM_Contact_BAO_Contact::formatProfileContactParams() (line 1840 of /home/webeditor/jenkins-node/workspace/buildkit-demos.civicrm.org/build/d7-demo/sites/all/modules/civicrm/CRM/Contact/BAO/Contact.php).


Of course, matching to a non-existing ID is not possible. However, the import should not crash - I think that before CiviCRM imported all possible contacts and gave back a csv-file with the import-errors. The current behaviour is particularly difficult when using a big import file and you don't know, which contact ist causing the problems.

Has anybody else experienced similar problems? Should I post an issue on JIRA?

Best Regards
Fabian

JonGold

  • Ask me questions
  • ****
  • Posts: 638
  • Karma: 81
    • Palante Technology
  • CiviCRM version: 4.1 to the latest
  • CMS version: Drupal 6-7, Wordpress 4.0+
  • PHP version: PHP 5.3-5.5
Re: Constraint Violation Error when matching on non-existing CiviCRM ID
March 31, 2014, 08:12:46 am
This is related to, but separate from, this: http://forum.civicrm.org/index.php/topic,32155.0.html

Both should be fixed together!  If someone opens a bug for this (and they should!) please post a link here.  I'm not saying I have the bandwidth to fix this - I don't - but I'll put it on my list for when I have some pro-bono time.
Sign up to StackExchange and get free expert CiviCRM advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Import (Moderator: Yashodha Chaku) »
  • Constraint Violation Error when matching on non-existing CiviCRM ID

This forum was archived on 2017-11-26.