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) »
  • Errors importing contacts, mappings not saved
Pages: [1]

Author Topic: Errors importing contacts, mappings not saved  (Read 1044 times)

robbrandt

  • I post occasionally
  • **
  • Posts: 89
  • Karma: 0
  • CiviCRM version: 4.0.7
  • CMS version: Drupal
  • MySQL version: 5.1.41-3ubuntu12.9
  • PHP version: 5.3.6
Errors importing contacts, mappings not saved
November 17, 2011, 11:37:27 am
Having a lot of frustration getting contacts imported.  Using 4.0.7 on Drupal, new installation and user.  I have a 2 line test import record with about 55 columns on it (many of them skipped).  I do have some custom data configured that some of the import is supposed to flow into.  The purpose of this import is to bring in our data from our old system.  The old system is a relational database, no duplicates, so I have set the option to not dedupe.  I selected the existing ID column as the Internal Identifier.

When I "Continue" from step 3 to step 4, I get the following error:

    Notice: Undefined index: custom in _civicrm_add_formatted_param() (line 352 of /home/botany/domains/civicrm.botany.org/public_html/sites/all/modules/civicrm/api/v2/utils.v2.php).
    Notice: Undefined index: contact_type in _civicrm_add_formatted_param() (line 353 of /home/botany/domains/civicrm.botany.org/public_html/sites/all/modules/civicrm/api/v2/utils.v2.php).
    Notice: Undefined index: prefix_id in _civicrm_add_formatted_param() (line 210 of /home/botany/domains/civicrm.botany.org/public_html/sites/all/modules/civicrm/api/v2/utils.v2.php).
    Notice: Undefined variable: newContact in CRM_Import_Parser_Contact->import() (line 654 of /home/botany/domains/civicrm.botany.org/public_html/sites/all/modules/civicrm/CRM/Import/Parser/Contact.php).
    Notice: Undefined variable: newContact in CRM_Import_Parser_Contact->import() (line 685 of /home/botany/domains/civicrm.botany.org/public_html/sites/all/modules/civicrm/CRM/Import/Parser/Contact.php).
    Notice: Undefined variable: newContact in CRM_Import_Parser_Contact->import() (line 685 of /home/botany/domains/civicrm.botany.org/public_html/sites/all/modules/civicrm/CRM/Import/Parser/Contact.php).
    Notice: Undefined variable: newContact in CRM_Import_Parser_Contact->import() (line 695 of /home/botany/domains/civicrm.botany.org/public_html/sites/all/modules/civicrm/CRM/Import/Parser/Contact.php).

The mapping was not created (grrrrr...)

OK, so I am thinking that my usage of the Internal Identifier is wrong, so I chose to not import that (I'll figure out how to set relations later).  This time I get similar errors to above, but my records do import.  But still no field mapping saved (GRRRR...)

What am I doing wrong?

How do I contruct this import so that I can preserve relations (for example, import old membership records, donations and other data).

Thanks.

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: Errors importing contacts, mappings not saved
November 17, 2011, 01:10:44 pm

You might want to suppress the notices via the Drupal admin screens to get rid of the below notices. We've made a big effort in 4.1 to make civicrm notice compliant

I would start off with just mapping 3-5 columns, saving that mapping and ensuring it works etc.

If your import mappings are not saving, please reproduce them on our demo server and give us steps to reproduce

thanx

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

robbrandt

  • I post occasionally
  • **
  • Posts: 89
  • Karma: 0
  • CiviCRM version: 4.0.7
  • CMS version: Drupal
  • MySQL version: 5.1.41-3ubuntu12.9
  • PHP version: 5.3.6
Re: Errors importing contacts, mappings not saved
November 17, 2011, 01:31:34 pm
Thanks.  I've run the import on the demo site with my 2 record import file.  The results were just like my own site.

It occurs to me I might be severely misunderstanding what's supposed to happen.  Just like my site, I get this:

http://drupal.demo.civicrm.org/civicrm/admin/mapping?action=update&id=1&reset=1

However there aren't any mappings to edit, and the notice below says "There are currently no saved import or export mappings. You create saved mappings as part of an Import or Export task. "  Which tells me that the "header" of the mapping is saved, but not the actual field mappings themselves.  Otherwise, what's the point of "Edit Mappings" other than to change the name and description(?).

Anyway, I only mapped three of the fields; SHIPLNAME, SHIPMNAME, SHIPFNAME.  I checked the box for the first line including column headings, and selected no duplicate checking.  Import file attached.

robbrandt

  • I post occasionally
  • **
  • Posts: 89
  • Karma: 0
  • CiviCRM version: 4.0.7
  • CMS version: Drupal
  • MySQL version: 5.1.41-3ubuntu12.9
  • PHP version: 5.3.6
Re: Errors importing contacts, mappings not saved
November 17, 2011, 01:38:25 pm
Quote from: robbrandt on November 17, 2011, 01:31:34 pm
It occurs to me I might be severely misunderstanding what's supposed to happen.

Yep, I see it now: "This screen allows you to rename or delete existing mappings.".  If that's all there is to it, you should remove the "There are currently no saved import or export mappings" notice, very confusing to this newbie.

So back to square one: I have record IDs for all my data to import in order to retain relational links.  Do I assign these as Internal Contact IDs?

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: Errors importing contacts, mappings not saved
November 17, 2011, 01:40:00 pm
Check:

http://drupal.demo.civicrm.org/civicrm/admin/mapping?action=browse&reset=1

however on that screen, u only change the name / description. You update the mapping in import/export. You can load/create/update a mapping via the import screens. Can you file an issue for the bad message (http://issues.civicrm.org/)

i'd assign them to the "external_identifier" field

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

robbrandt

  • I post occasionally
  • **
  • Posts: 89
  • Karma: 0
  • CiviCRM version: 4.0.7
  • CMS version: Drupal
  • MySQL version: 5.1.41-3ubuntu12.9
  • PHP version: 5.3.6
Re: Errors importing contacts, mappings not saved
November 17, 2011, 01:43:12 pm
Hmm, we already have an external identifier, that other entities need to grant members access to their sites. I guess that would be a custom field then.  Not advisable to use the Internal ID?

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

This forum was archived on 2017-11-26.