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 Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Activity import gives "no matching contact" error
Pages: [1]

Author Topic: Activity import gives "no matching contact" error  (Read 2643 times)

bostaurus

  • I’m new here
  • *
  • Posts: 22
  • Karma: 0
Activity import gives "no matching contact" error
April 07, 2012, 01:53:52 pm
Hi

I'm trying to import activities from a csv file.  I have columns for:
Activity Type ID  (the ID number corresponding to the Activity Type)
Activity Subject
Activity Date
Email Address (of the contact who participated in the activity)

I know the contacts exist in the database with these correct email addresses.

All of the imports fail with the error Reason in the downloadable error file as:   "no matching contact found for ..." even though I know the emails exist.

The same error occurs if I try to use Activity Label instead of Activity Type ID.

I've replicated this same problem on the Demo site - I imported the same contacts with emails and then attempted to import activities - same error for all contacts - no matching contact found.

Am I doing something wrong or is this a bug?

Many thanks everyone!

Leslie Bostaurus

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: Activity import gives "no matching contact" error
April 07, 2012, 10:52:25 pm
Hi Leslie,

I just took a look at the Civi code to see how activity imports work.

If you don't have an external contact ID as an import field, it attempts to locate the contact using the Dedupe rules, which you can find on Contacts menu->Find and Merge Duplicate Contacts.  That is, assuming you're using a recent version - could you let us know what version you're running?

It will attempt to use the default "Strict Individual" match - could you look at that dedupe rule?  It's possible someone changed it so that an e-mail address is insufficient to trigger a duplicate check, which would give you the error you're seeing.

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

bostaurus

  • I’m new here
  • *
  • Posts: 22
  • Karma: 0
Re: Activity import gives "no matching contact" error
April 08, 2012, 06:37:08 am
Hi Jon,

Thanks so much for your reply!  To answer your questions:

1.  I am using version 4.1.1 running on Drupal 6.24

2.  I have the "Individual Strict In-built" dedupe rule set as default, which checks just for matching email.  Same thing on the demo site - I checked to be sure the "Individual Strict In-built" rule was set as default before attempting activity import.

On my site, as well as the Demo site, I get the error message:  "Rows with invalid data in one or more fields. These rows will be skipped (not imported). "  And this applies to ALL of the activity records I attempted to import.

Then, when I open the "Download Errors" file and look at it in Excel, I see that for ALL of the records, the Reason is:
No matching Contact found for (email address)

Even though I can clearly show that the email addresses exist in the database.

Thanks for helping me puzzle this out!  I wouldn't rule out the possibility that I'm doing something wrong, since this is the first time I'm trying to import Activities.
I can send you import files I am using if you want to try it your self on the demo site.

Thanks again!!!

Leslie




ken

  • I live on this forum
  • *****
  • Posts: 916
  • Karma: 53
    • City Bible Forum
  • CiviCRM version: 4.6.3
  • CMS version: Drupal 7.36
  • MySQL version: 5.5.41
  • PHP version: 5.3.10
Re: Activity import gives "no matching contact" error
April 25, 2012, 07:23:14 pm
I'm getting a similar error.

My default strict individual dedupe rule is email+firstname+lastname.

When I try to import activities, none load - the error is "No matching Contact found for (email@address Firstname Lastname )" even though that contact exists.

I thought, "maybe it's trying a different dedupe rule", so I just imported the email address, and got the error "Missing required contact matching fields. email(weight 10) first_name(weight 10) last_name(weight 10) (Sum of all weights should be greater than or equal to threshold: 30)."

So CiviCRM is using the correct dedupe rule, but rejecting correct data (I used the same spreadsheet to upload the contacts for which I'm now trying to create activities, so I know the data is correct).

Any pointers?

Ken

narayanis

  • I post occasionally
  • **
  • Posts: 56
  • Karma: 2
Re: Activity import gives "no matching contact" error
June 23, 2012, 03:02:41 pm
I'm having the same issue running 4.1.1 on Drupal 7.14. Could it be related to the way the CSV is being parsed? In my case the error message says:
No matching Contact found for (email address )

Note the whitespace before the closed parenthesis. This space doesn't exist in my file, unless the carriage return between records is being treated as whitespace.

narayanis

  • I post occasionally
  • **
  • Posts: 56
  • Karma: 2
Re: Activity import gives "no matching contact" error
June 28, 2012, 09:08:58 pm
Is there an existing issue in Jira for this, or should we make a new one? We have a couple hundred activities to import and this issue is blocking that. In the meantime, we sponsored some dev time on the Webform CiviCRM module to facilitate quick entry for activities, so if you only have a couple dozen to import, check that module out as a temporary workaround.

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: Activity import gives "no matching contact" error
June 28, 2012, 09:10:54 pm
I had a similar (but different) activity import issue on 4.1.1 that got fixed in 4.1.3.  Perhaps the same code that fixed my bug fixed yours?
Sign up to StackExchange and get free expert CiviCRM advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

narayanis

  • I post occasionally
  • **
  • Posts: 56
  • Karma: 2
Re: Activity import gives "no matching contact" error
July 01, 2012, 05:33:02 am
I updated to 4.1.3 yesterday and tried the import again, with the same result. Is the contact matching tied to a specific location type, perhaps?

narayanis

  • I post occasionally
  • **
  • Posts: 56
  • Karma: 2
Re: Activity import gives "no matching contact" error
July 06, 2012, 05:20:41 pm
I've created Jira ticket CRM-10489 for this:

http://issues.civicrm.org/jira/browse/CRM-10489

Mark Pi

  • I’m new here
  • *
  • Posts: 1
  • Karma: 0
  • CiviCRM version: 4.1.3
  • CMS version: WP
  • MySQL version: asdfasdfas def
  • PHP version: asdfasdfasdfasdf
Re: Activity import gives "no matching contact" error
July 24, 2012, 10:32:55 am
4.1.3 on WP is doing the same thing, except when importing members. Sandbox does the same.

Out of 60 members 4 are imported successfully. There is no clear reason why. The CSV shows no discrepencies.

pkeogan

  • I post frequently
  • ***
  • Posts: 130
  • Karma: 4
    • BackOffice Thinking
Re: Activity import gives "no matching contact" error
July 27, 2012, 08:14:36 pm
I have seen this also.  Have you tried importing matching on Internal ID of the contact?

I would try a couple with the internal ID.  If that works you can export the ID and email addressa and then add the internal ID to your csv file  (using vlookup)



narayanis

  • I post occasionally
  • **
  • Posts: 56
  • Karma: 2
Re: Activity import gives "no matching contact" error
July 27, 2012, 08:15:49 pm
I can confirm that matching on Internal ID works as expected. It's the email matching that's broken.

pkeogan

  • I post frequently
  • ***
  • Posts: 130
  • Karma: 4
    • BackOffice Thinking
Re: Activity import gives "no matching contact" error
July 27, 2012, 08:25:04 pm
Agreed that the email match should work and is worth a ticket to fix.  But until it's fixed, users can always do the matching on internal ID.   Actually, I almost always import matching on internal ID because it ensures no mistakes.  With email/external id there is always a chance of duplicates which can mean a mismatch during import. :)

ken

  • I live on this forum
  • *****
  • Posts: 916
  • Karma: 53
    • City Bible Forum
  • CiviCRM version: 4.6.3
  • CMS version: Drupal 7.36
  • MySQL version: 5.5.41
  • PHP version: 5.3.10
Re: Activity import gives "no matching contact" error
August 17, 2012, 06:44:16 am
I think I've cracked this one. See my patch on CRM-10489 ( http://issues.civicrm.org/jira/browse/CRM-10489 )

(The import parser called an API function that didn't exist, and interpreted the error result ('no such function') as meaning the database had been searched and no matching contact had been found. I simply called a deprecated API function that does the trick.)

Wiser eyes than mine need to look at this and ensure there are no gotchas.

Ken

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Activity import gives "no matching contact" error

This forum was archived on 2017-11-26.