Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Xero extension breaks merging contacts #45

Open
benasp123 opened this issue Oct 30, 2019 · 3 comments
Open

Xero extension breaks merging contacts #45

benasp123 opened this issue Oct 30, 2019 · 3 comments

Comments

@benasp123
Copy link

It looks like this extentsion stops contacts being merged together.

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 (7.67) + Civi (5.18.3) + civixero (1.2)

@agileware-fj
Copy link
Contributor

Annoyingly this is breaking out of a try...catch block because the DB layer error "handling" bursting through to CRM_Core_Error::exceptionHandler

@eileenmcnaughton
Copy link
Owner

d5c7df7

@eileenmcnaughton
Copy link
Owner

I just merged a patch by @kenwest which may help -in 1.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants