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) »
  • Import Errors
Pages: [1]

Author Topic: Import Errors  (Read 1374 times)

mocodigital

  • I’m new here
  • *
  • Posts: 19
  • Karma: 0
  • CiviCRM version: 4.3.1
  • CMS version: Joomla 2.5.1
  • MySQL version: 5.5
  • PHP version: 5
Import Errors
May 05, 2013, 05:03:24 am
I have a database of Parents and Children - the children have a unique identifier which links them to their parent, obviously some parents have 2 or 3 kids.

I have tried to import the contacts by CSV but I get this erros after it imports:

I have attached the back trace and Joomal Error console.

I have also attached the data fie (minus the Childres surnames and Dobs, etc)

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Import Errors
May 05, 2013, 06:54:46 am

Seems like your import has the same external identifier for multiple contacts

civi expects the external identifier to be unique across all contacts and uses mysql to enforce this

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

mocodigital

  • I’m new here
  • *
  • Posts: 19
  • Karma: 0
  • CiviCRM version: 4.3.1
  • CMS version: Joomla 2.5.1
  • MySQL version: 5.5
  • PHP version: 5
Re: Import Errors
May 05, 2013, 10:59:53 pm
Is there not a way around this as some parents have two or three children so in the relationship the parent would be the same every time.

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Import Errors
May 06, 2013, 12:25:56 am
Are you creating a Parent - with their ID - then creating the children and creating a RElationship to the Parent using the Parent ID as the External ID.

Should work.

Can you spell out your workflow more.
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

mocodigital

  • I’m new here
  • *
  • Posts: 19
  • Karma: 0
  • CiviCRM version: 4.3.1
  • CMS version: Joomla 2.5.1
  • MySQL version: 5.5
  • PHP version: 5
Re: Import Errors
May 06, 2013, 12:31:21 am
Ok its a sport coaching class business for kids, we are trying to import the parents which are in a separate table and the children.

i read the notes that say import the children first with an External ID for the parent, but some parents have more than one child so the external ID is the same...

This is where it get stuck.

I need to import all of the parents and their children and setup the relationship as individuals.

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Import Errors
May 06, 2013, 12:36:03 am
i don't see how you can import the children first if the parent is the record with the external id.

import the parents first including their external id.

then use that when importing the children to create the relationship during the import to that record ie in the mapping you will have to choose 'relationship = child of' then select 'external id' so that the import says 'ah this is an external Id for the parent, so i will link the child to this existing parent record'

hth
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

mocodigital

  • I’m new here
  • *
  • Posts: 19
  • Karma: 0
  • CiviCRM version: 4.3.1
  • CMS version: Joomla 2.5.1
  • MySQL version: 5.5
  • PHP version: 5
Re: Import Errors
May 06, 2013, 01:31:56 am
Ok I tried that and it works on a sample but when I pull the whole file through I get the DB Error again on a unique indentifier.

It seems to get stuck again with more than one child, but has worked on the sample as I included multiple children in the sample

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Import Errors
May 06, 2013, 07:18:18 am

check the whole file again

most likely you have some bad data where two parents are sharing the same external id

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Import (Moderator: Yashodha Chaku) »
  • Import Errors

This forum was archived on 2017-11-26.