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) »
  • CiviCRM has detected mismatched contact IDs. Mismatched contact SubTypes
Pages: [1]

Author Topic: CiviCRM has detected mismatched contact IDs. Mismatched contact SubTypes  (Read 2622 times)

Andrew Perry

  • I post occasionally
  • **
  • Posts: 98
  • Karma: 1
  • Building empowering tools that comply with rules
    • Community Builders Australia
  • CiviCRM version: 3.x, 4.x
  • CMS version: Joomla 1.0.x, 1.5.x -> Drupal 6.x, 7.x, WordPress
  • MySQL version: 5.1, 5.5, 5.6
  • PHP version: 5.2, 5.3, 5.4
CiviCRM has detected mismatched contact IDs. Mismatched contact SubTypes
April 13, 2010, 03:10:09 am
We have migrated a Joomla install to Drupal and then upgraded to 3.1.3.

We are experiencing a problem trying to use the new Organization Subtypes.

We have created a Subtype and added a custom field group to that Subtype.  We want to update a bunch of contacts that have a null Custom Field with some data in that Custom Field.  We have exported the Internal ID and Organization name for the item, and there is automatically added a Subtype column to the export even though we didn't request it.

The Subtype name that is listed appears to be the Subtype name I first called that Subtype when I created it, even though I subsequently renamed it.  I tried deleting that column and just reimporting the Internal ID and the column with the data we wanted to add to the Custom Field, and you get the message

"Import has completed successfully. The information below summarizes the results.

CiviCRM has detected mismatched contact IDs. These records have not been updated.

You can Download Mismatched Contacts. You may then correct them, and import the new file with the corrected data."

In the csv file that you can download, it shows "Mismatched contact SubTypes :" as the reason.

If I add in the Subtype column, with the incorrect (ie old) name for the Subtype, you still get this message.  If you change the name of Subtype to the new name for that Subtype, you get an error at the "Preview" stage, ie a step earlier, with the Reason for the error in the csv file being: "Invalid value for field(s) : field ID; "

I have tried the first process on the 3.2 Sandbox (nice ongoing UI improvements BTW) and get a similar result except that the excel spreadsheet is empty when the system reports the mismatched contacts at the final stage where I get the same message:

"Import has completed successfully. The information below summarizes the results.
CiviCRM has detected mismatched contact ID. This record have not been updated.
You can Download Mismatched Contacts. You may then correct them, and import the new file with the corrected data."
Community Builders Australia Pty Ltd
www.communitybuilders.com.au

mumedia

  • I’m new here
  • *
  • Posts: 3
  • Karma: 0
Re: CiviCRM has detected mismatched contact IDs. Mismatched contact SubTypes
May 30, 2010, 03:00:55 pm
I'm having a similar issue with Individual Contact subtypes.

I created an Individual Contact subtype and imported several hundred of contacts under this subtype into CiviCRM.

After the initial import, I wanted to make some updates to these contacts using the Import system and the fill/update mechanism of the Duplicate checking function. I mapped my contacts appropriately, using both internal and external identifiers, but the import keeps returning the same "Mismatched Contact SubTypes" error - even though I'm making sure at the outset to choose the correct subtype in my import.

Any help/advice would be much appreciated.

Deepak Srivastava

  • Ask me questions
  • ****
  • Posts: 677
  • Karma: 65
Re: CiviCRM has detected mismatched contact IDs. Mismatched contact SubTypes
June 01, 2010, 05:57:40 am
Import tries to throw error if it finds any custom entries for the old subtype, even if the new subtype is same as the old one, which is definitely a bug.

Could you test the below patch and see how it works. Also file an issue for this.

Code: [Select]
Index: CRM/Import/Parser/Contact.php
===================================================================
--- CRM/Import/Parser/Contact.php (revision 27964)
+++ CRM/Import/Parser/Contact.php (working copy)
@@ -557,7 +557,7 @@
                                 }
                                 
                                 if ( !empty($contactSubType) &&
-                                     ( !CRM_Contact_BAO_ContactType::isAllowEdit($params['id'], $contactSubType) ||
+                                     ( !CRM_Contact_BAO_ContactType::isAllowEdit($params['id'], $contactSubType) &&
                                         $contactSubType != CRM_Utils_Array::value('contact_sub_type', $formatted)  ) ) {
                                     
                                     $message = "Mismatched contact SubTypes :";
@@ -603,7 +603,7 @@
                             }
                             
                             if ( !empty($contactSubType) &&
-                                 (!CRM_Contact_BAO_ContactType::isAllowEdit($params['id'], $contactSubType) ||
+                                 (!CRM_Contact_BAO_ContactType::isAllowEdit($params['id'], $contactSubType) &&
                                    $contactSubType != CRM_Utils_Array::value('contact_sub_type', $formatted)  ) ) {
                                 
                                 $message = "Mismatched contact SubTypes :";
@@ -749,7 +749,7 @@
                             }
                             
                             if ( !empty($relatedCsType) &&
-                                 (!CRM_Contact_BAO_ContactType::isAllowEdit($params[$key]['id'], $relatedCsType) ||
+                                 (!CRM_Contact_BAO_ContactType::isAllowEdit($params[$key]['id'], $relatedCsType) &&
                                    $relatedCsType != CRM_Utils_Array::value( 'contact_sub_type', $formatting )     ) ) {
                                 $errorMessage = ts( "Mismatched or Invalid contact subtype found for this related contact ID: %1", array( 1 => $params[$key]['id'] ) );
                                 array_unshift($values, $errorMessage);
@@ -807,7 +807,7 @@
                         }
                         
                         if ( !empty($relatedCsType) &&
-                             (!CRM_Contact_BAO_ContactType::isAllowEdit($matchedIDs[0], $relatedCsType) ||
+                             (!CRM_Contact_BAO_ContactType::isAllowEdit($matchedIDs[0], $relatedCsType) &&
                               $relatedCsType != CRM_Utils_Array::value('contact_sub_type', $formatting)   ) ) {
                             $errorMessage = ts( "Mismatched or Invalid contact subtype found for this related contact." );
                             array_unshift($values, $errorMessage);

Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

Deepak Srivastava

  • Ask me questions
  • ****
  • Posts: 677
  • Karma: 65
Re: CiviCRM has detected mismatched contact IDs. Mismatched contact SubTypes
June 14, 2010, 07:36:47 am
FTP, filed an issue here - http://issues.civicrm.org/jira/browse/CRM-6352.
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

Conga3.com

  • I post occasionally
  • **
  • Posts: 51
  • Karma: 5
  • Should be golfing...
    • Conga3
Re: CiviCRM has detected mismatched contact IDs. Mismatched contact SubTypes
June 22, 2010, 08:08:46 am
I had this problem, searched "Mismatched contact SubTypes" and found this post.

I applied the patch Deepak .... and I'm testing the results.

The conditions that I operated in that got me the error in the first place :

-CiviCRM 3.1.15
-Joomla 1.5.18
-PHP 5.2.9
-MySQL 5.0.84

I have created an Individual subtype, and added two custom data fields (one group) to this subtype.  While importing 600+ records, I had 7 errors with "Mismatched contact SubTypes" while using the FILL option and importing the contact records to the Subtype.

I can provide more specifics if needed to help test this bug/patch.

« Last Edit: June 22, 2010, 08:57:42 am by Conga3.com »

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Import (Moderator: Yashodha Chaku) »
  • CiviCRM has detected mismatched contact IDs. Mismatched contact SubTypes

This forum was archived on 2017-11-26.