Answers.Body: <p>It seems to be an issue with xero (I'm assuming it's an extension/plugin that you have enabled on your site)?</p>
  
  <p>If you are using fuzion's extension, you might want to check if it's already logged as an issue or if there is a solution already</p>
  
  <p><a href="https://github.com/eileenmcnaughton/nz.co.fuzion.civixero" rel="nofollow noreferrer">https://github.com/eileenmcnaughton/nz.co.fuzion.civixero</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-10-21T00:33:58.977Z
Answers.Text: Thanks Xavier. I will submit a post on the github site.
Answers.UserDisplayName: Ben
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-10-18T07:31:16.097Z
Answers.LastActivityDate: 2019-10-18T07:31:16.097Z
Answers.UserDisplayName: Xavier
Body: <p>I am trying to merge 2 contacts (individuals). I search for the contact, select both contacts and select merge. Go through the options. A message saying: Contacts Merged, Name has been updated. Contact ID 1951 has been deleted.</p>
  
  <p>The contacts are not merged and no contacts are deleted.</p>
  
  <p>The log file in ConfigAndLog has this message:</p>
  
  <p>[error] $Fatal Error Details = Array
  (
      [callback] => Array
          (
              [0] => CRM_Core_Error
              [1] => exceptionHandler
          )</p>
  
  <pre><code>[code] =&gt; -5
  [message] =&gt; DB Error: already exists
  [mode] =&gt; 16
  [debug_info] =&gt; UPDATE  civicrm_account_contact  SET contact_id = 1951 , accounts_contact_id = '2bd64d12-13b0-4188-a708-430aa0bb8f5b' , accounts_display_name = 'Neil T - 1501' , last_sync_date = 20191018151509 , accounts_modified_date = 20191018000000 , accounts_data = 'Array' , accounts_needs_update = 0 , connector_id = 0 , plugin = 'xero' , do_not_sync = 0   WHERE (  civicrm_account_contact.id = 2598 )   [nativecode=1062 ** Duplicate entry '1951-0-xero' for key 'contact_id_plugin']
  [type] =&gt; DB_Error
  [user_info] =&gt; UPDATE  civicrm_account_contact  SET contact_id = 1951 , accounts_contact_id = '2bd64d12-13b0-4188-a708-430aa0bb8f5b' , accounts_display_name = 'Neil T - 1501' , last_sync_date = 20191018151509 , accounts_modified_date = 20191018000000 , accounts_data = 'Array' , accounts_needs_update = 0 , connector_id = 0 , plugin = 'xero' , do_not_sync = 0   WHERE (  civicrm_account_contact.id = 2598 )   [nativecode=1062 ** Duplicate entry '1951-0-xero' for key 'contact_id_plugin']
  [to_string] =&gt; [db_error: message="DB Error: already exists" code=-5 mode=callback callback=CRM_Core_Error::exceptionHandler prefix="" info="UPDATE  civicrm_account_contact  SET contact_id = 1951 , accounts_contact_id = '2bd64d12-13b0-4188-a708-430aa0bb8f5b' , accounts_display_name = 'Neil T - 1501' , last_sync_date = 20191018151509 , accounts_modified_date = 20191018000000 , accounts_data = 'Array' , accounts_needs_update = 0 , connector_id = 0 , plugin = 'xero' , do_not_sync = 0   WHERE (  civicrm_account_contact.id = 2598 )   [nativecode=1062 ** Duplicate entry '1951-0-xero' for key 'contact_id_plugin']"]
  </code></pre>
  
  <p>)</p>
  
  <p>Using latest version of Drupal + Civi</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-10-18T07:31:17.737Z
Comments.Text: Ben - you should be precise on versions rather than just saying latest so the question continues to be useful,
Comments.UserDisplayName: Mick Kahn
Tags: <duplicate-contacts><civixero>
Title: Merging contacts not working
ThreadText: # Merging contacts not working
  
  (Asked by: username_0 on 2019-10-18)
  
  I am trying to merge 2 contacts (individuals). I search for the contact, select both contacts and select merge. Go through the options. A message saying: Contacts Merged, Name has been updated. Contact ID 1951 has been deleted.
  The contacts are not merged and no contacts are deleted.
  The log file in ConfigAndLog has this message:
  [error] $Fatal Error Details = Array
  (
      [callback] => Array
          (
              [0] => CRM_Core_Error
              [1] => exceptionHandler
          )
  [code] => -5
  [message] => DB Error: already exists
  [mode] => 16
  [debug_info] => UPDATE  civicrm_account_contact  SET contact_id = 1951 , accounts_contact_id = '2bd64d12-13b0-4188-a708-430aa0bb8f5b' , accounts_display_name = 'Neil T - 1501' , last_sync_date = 20191018151509 , accounts_modified_date = 20191018000000 , accounts_data = 'Array' , accounts_needs_update = 0 , connector_id = 0 , plugin = 'xero' , do_not_sync = 0   WHERE (  civicrm_account_contact.id = 2598 )   [nativecode=1062 ** Duplicate entry '1951-0-xero' for key 'contact_id_plugin']
  [type] => DB_Error
  [user_info] => UPDATE  civicrm_account_contact  SET contact_id = 1951 , accounts_contact_id = '2bd64d12-13b0-4188-a708-430aa0bb8f5b' , accounts_display_name = 'Neil T - 1501' , last_sync_date = 20191018151509 , accounts_modified_date = 20191018000000 , accounts_data = 'Array' , accounts_needs_update = 0 , connector_id = 0 , plugin = 'xero' , do_not_sync = 0   WHERE (  civicrm_account_contact.id = 2598 )   [nativecode=1062 ** Duplicate entry '1951-0-xero' for key 'contact_id_plugin']
  [to_string] => [db_error: message="DB Error: already exists" code=-5 mode=callback callback=CRM_Core_Error::exceptionHandler prefix="" info="UPDATE  civicrm_account_contact  SET contact_id = 1951 , accounts_contact_id = '2bd64d12-13b0-4188-a708-430aa0bb8f5b' , accounts_display_name = 'Neil T - 1501' , last_sync_date = 20191018151509 , accounts_modified_date = 20191018000000 , accounts_data = 'Array' , accounts_needs_update = 0 , connector_id = 0 , plugin = 'xero' , do_not_sync = 0   WHERE (  civicrm_account_contact.id = 2598 )   [nativecode=1062 ** Duplicate entry '1951-0-xero' for key 'contact_id_plugin']"]
  
  )
  Using latest version of Drupal + Civi
  
  **Tags:** duplicate-contacts, civixero
  
  > **Comments:**
  > **username_1**: username_0 - you should be precise on versions rather than just saying latest so the question continues to be useful,  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2019-10-18. Score: 2
  
  It seems to be an issue with xero (I'm assuming it's an extension/plugin that you have enabled on your site)?
  
  If you are using fuzion's extension, you might want to check if it's already logged as an issue or if there is a solution already
  
  <https://github.com/eileenmcnaughton/nz.co.fuzion.civixero>
  
  > **Comments:**
  > **username_0**: Thanks username_2. I will submit a post on the github site.  
  
  ---
  
  