0

I am receiving this back trace when trying to merge records after running Individual Supervised dedupe rule. Please advise.

Apr 07 17:51:30  [info] $backTrace = #0 /home/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/Error.php(235): CRM_Core_Error::backtrace("backTrace", TRUE)
#1 [internal function](): CRM_Core_Error::handle(Object(DB_Error))
#2 /home/public_html/administrator/components/com_civicrm/civicrm/packages/PEAR.php(931): call_user_func((Array:2), Object(DB_Error))
#3 /home/public_html/administrator/components/com_civicrm/civicrm/packages/DB.php(976): PEAR_Error->PEAR_Error("DB Error: unknown error", -1, 16, (Array:2), "UPDATE  civicrm_contact  SET contact_type = 'Individual' , contact_sub_type =...")
#4 /home/public_html/administrator/components/com_civicrm/civicrm/packages/PEAR.php(564): DB_Error->DB_Error(-1, 16, (Array:2), "UPDATE  civicrm_contact  SET contact_type = 'Individual' , contact_sub_type =...")
#5 /home/public_html/administrator/components/com_civicrm/civicrm/packages/DB/common.php(1905): PEAR->raiseError(NULL, -1, NULL, NULL, "UPDATE  civicrm_contact  SET contact_type = 'Individual' , contact_sub_type =...", "DB_Error", TRUE)
#6 /home/public_html/administrator/components/com_civicrm/civicrm/packages/DB/mysql.php(895): DB_common->raiseError(-1, NULL, NULL, NULL, "1205 ** Lock wait timeout exceeded; try restarting transaction")
#7 /home/public_html/administrator/components/com_civicrm/civicrm/packages/DB/mysql.php(328): DB_mysql->mysqlRaiseError()
#8 /home/public_html/administrator/components/com_civicrm/civicrm/packages/DB/common.php(1216): DB_mysql->simpleQuery("UPDATE  civicrm_contact  SET contact_type = 'Individual' , contact_sub_type =...")
#9 /home/public_html/administrator/components/com_civicrm/civicrm/packages/DB/DataObject.php(2435): DB_common->query("UPDATE  civicrm_contact  SET contact_type = 'Individual' , contact_sub_type =...")
#10 /home/public_html/administrator/components/com_civicrm/civicrm/packages/DB/DataObject.php(1338): DB_DataObject->_query("UPDATE  civicrm_contact  SET contact_type = 'Individual' , contact_sub_type =...")
#11 /home/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/DAO.php(459): DB_DataObject->update()
#12 /home/public_html/administrator/components/com_civicrm/civicrm/CRM/Contact/BAO/Contact.php(213): CRM_Core_DAO->save()
#13 /home/public_html/administrator/components/com_civicrm/civicrm/CRM/Contact/BAO/Contact.php(312): CRM_Contact_BAO_Contact::add((Array:12))
#14 /home/public_html/administrator/components/com_civicrm/civicrm/CRM/Contact/BAO/Contact.php(1897): CRM_Contact_BAO_Contact::create((Array:12))
#15 /home/public_html/administrator/components/com_civicrm/civicrm/CRM/Dedupe/Merger.php(1840): CRM_Contact_BAO_Contact::createProfileContact((Array:7), (Array:0), "152")
#16 /home/public_html/administrator/components/com_civicrm/civicrm/CRM/Contact/Form/Merge.php(318): CRM_Dedupe_Merger::moveAllBelongings("152", "9317", (Array:10))
#17 /home/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/Form.php(423): CRM_Contact_Form_Merge->postProcess()
#18 /home/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/QuickForm/Action/Done.php(75): CRM_Core_Form->mainProcess()
#19 /home/public_html/administrator/components/com_civicrm/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Done->perform(Object(CRM_Contact_Form_Merge), "done")
#20 /home/public_html/administrator/components/com_civicrm/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Contact_Form_Merge), "done")
#21 /home/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/Controller.php(351): HTML_QuickForm_Page->handle("done")
#22 /home/public_html/administrator/components/com_civicrm/civicrm/CRM/Utils/Wrapper.php(113): CRM_Core_Controller->run()
#23 /home/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/Invoke.php(286): CRM_Utils_Wrapper->run("CRM_Contact_Form_Merge", "Merge Contact", NULL)
#24 /home/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/Invoke.php(86): CRM_Core_Invoke::runItem((Array:13))
#25 /home/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/Invoke.php(54): CRM_Core_Invoke::_invoke((Array:3))
#26 /home/public_html/administrator/components/com_civicrm/civicrm.php(116): CRM_Core_Invoke::invoke((Array:3))
#27 /home/public_html/administrator/components/com_civicrm/civicrm.php(40): civicrm_invoke()
#28 /home/public_html/libraries/cms/component/helper.php(392): require_once("/home/public_html/administrator/components/com_civicrm/civicrm.php")
#29 /home/public_html/libraries/cms/component/helper.php(372): JComponentHelper::executeComponent("/home/public_html/administrator/components/com_civicrm/civicrm.php")
#30 /home/public_html/libraries/cms/application/administrator.php(98): JComponentHelper::renderComponent("com_civicrm")
#31 /home/public_html/libraries/cms/application/administrator.php(152): JApplicationAdministrator->dispatch()
#32 /home/public_html/libraries/cms/application/cms.php(252): JApplicationAdministrator->doExecute()
#33 /home/public_html/administrator/index.php(47): JApplicationCms->execute()
#34 {main}
  • was this an issue with trying to merge contacts that were different sub-types? did those sub-types have different sets of custom fields on them? not sure how well merge would cope in that situation – petednz - fuzion Apr 8 '16 at 19:20
  • Different sub-types? Do you mean like' Home', 'Work', 'Main', etc?. All records are using the same data fields in all categories. The rule was using the default for first name, last name and email address. – BruceW Apr 10 '16 at 6:43
  • But what difference does it make? If there was different data in the same fields or different fields and the merge was to add in the same or different fields it was coming from, custom or not, all those fields would be already listed in the fixed drop-down menus. – BruceW Apr 10 '16 at 6:54
  • I meant Contact Sub-Types. Eg core gives you Individual. but you can make sub-types eg Student or Teacher. And for each sub-type you can make Custom Fields, eg Student might have Class, while Teacher might have Qualifications. And the only reason I raised it was that it might be an edge case that Merge doesn't like. – petednz - fuzion Apr 10 '16 at 19:40
1

One of the first things that I do when investigating these types of errors is to bump the truncation of SQL queries from 80 to 800 - no idea where that file is off the top of my head, I usually find it by grepping "80".

Then I run the command on the command line so that I get the full SQL error. Then it's much easier to fix.

At some point I'll file a patch request with core to make this change available for everyone.

  • Thanx. What command are you referring to? – BruceW Apr 10 '16 at 6:44
  • The bit in the log you copied and pasted which goes "UPDATE civicrm_contact SET contact_type = 'Individual'"... is an SQL command. These commands are run by CiviCRM to manipulate the data in the MySQL database. If you get the full command, by finding and updating the value I mentioned, then you will be able to read the native error. Hope that helps. – JohnFF Apr 11 '16 at 12:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.