Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Major
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.3.0
-
Fix Version/s: 4.3.0
-
Component/s: Accounting Integration, Core CiviCRM
-
Labels:None
Description
I'm not sure what property of these activities is causing the fatal but seems to be triggered by the activities created by Create Batch and / or Export Batch. Errors pasted below. To recreate:
1. Create new Accounting Batch
2. Add some transactions and close
3. Export the batch
4. Go to your own contact summary (logged in user) which has activities for the batch create and export
5. Activities tab counter shows the activities, but click tab and the datatable is stuck w/ Processing.
6. With debug enabled, right click on ajax call to see fatal:
=========
backTrace
#0 /Users/dgg/svn/crm_v4.3/CRM/Core/Error.php(148): CRM_Core_Error::backtrace()
#1 [internal function](): CRM_Core_Error::handle(Object(DB_Error))
#2 /Users/dgg/svn/crm_v4.3/packages/PEAR.php(931): call_user_func((Array:2), Object(DB_Error))
#3 /Users/dgg/svn/crm_v4.3/packages/DB.php(972): PEAR_Error->PEAR_Error("DB Error: ", -1, 16, (Array:2), "1062 ** Duplicate entry '629' for key 'PRIMARY' [DB Error: unknown error]")
#4 /Users/dgg/svn/crm_v4.3/packages/PEAR.php(564): DB_Error->DB_Error(NULL, 16, (Array:2), "1062 ** Duplicate entry '629' for key 'PRIMARY' [DB Error: unknown error]")
#5 /Users/dgg/svn/crm_v4.3/packages/DB/common.php(1904): PEAR->raiseError(NULL, NULL, NULL, NULL, "1062 ** Duplicate entry '629' for key 'PRIMARY' [DB Error: unknown error]", "DB_Error", TRUE)
#6 /Users/dgg/svn/crm_v4.3/packages/DB/mysql.php(898): DB_common->raiseError(-5, NULL, NULL, NULL, "1062 ** Duplicate entry '629' for key 'PRIMARY'")
#7 /Users/dgg/svn/crm_v4.3/packages/DB/mysql.php(327): DB_mysql->mysqlRaiseError()
#8 /Users/dgg/svn/crm_v4.3/packages/DB/common.php(1216): DB_mysql->simpleQuery("INSERT INTO civicrm_temp_activity_details_8bb54de567e601ec19a0e260b812bc71 (a...")
#9 /Users/dgg/svn/crm_v4.3/packages/DB/DataObject.php(2421): DB_common->query("INSERT INTO civicrm_temp_activity_details_8bb54de567e601ec19a0e260b812bc71 (a...")
#10 /Users/dgg/svn/crm_v4.3/packages/DB/DataObject.php(1613): DB_DataObject->_query("INSERT INTO civicrm_temp_activity_details_8bb54de567e601ec19a0e260b812bc71 (a...")
#11 /Users/dgg/svn/crm_v4.3/CRM/Core/DAO.php(155): DB_DataObject->query("INSERT INTO civicrm_temp_activity_details_8bb54de567e601ec19a0e260b812bc71 (a...")
#12 /Users/dgg/svn/crm_v4.3/CRM/Core/DAO.php(917): CRM_Core_DAO->query("INSERT INTO civicrm_temp_activity_details_8bb54de567e601ec19a0e260b812bc71 (a...", TRUE)
#13 /Users/dgg/svn/crm_v4.3/CRM/Activity/BAO/Activity.php(772): CRM_Core_DAO::executeQuery("INSERT INTO civicrm_temp_activity_details_8bb54de567e601ec19a0e260b812bc71 (a...", (Array:1))
#14 /Users/dgg/svn/crm_v4.3/CRM/Activity/BAO/Activity.php(2453): CRM_Activity_BAO_Activity::getActivities((Array:35))
#15 /Users/dgg/svn/crm_v4.3/CRM/Activity/Page/AJAX.php(427): CRM_Activity_BAO_Activity::getContactActivitySelector((Array:35))
#16 [internal function](): CRM_Activity_Page_AJAX::getContactActivity((Array:3))
#17 /Users/dgg/svn/crm_v4.3/CRM/Core/Invoke.php(262): call_user_func((Array:2), (Array:3))
#18 /Users/dgg/svn/crm_v4.3/CRM/Core/Invoke.php(70): CRM_Core_Invoke::runItem((Array:12))
#19 /Users/dgg/svn/crm_v4.3/CRM/Core/Invoke.php(52): CRM_Core_Invoke::_invoke((Array:3))
#20 /Users/dgg/svn/crm_v4.3/drupal/civicrm.module(461): CRM_Core_Invoke::invoke((Array:3))
#21 [internal function](): civicrm_invoke("ajax", "contactactivity")
#22 /Users/dgg/htdocs/drupal7/includes/menu.inc(516): call_user_func_array("civicrm_invoke", (Array:2))
#23 /Users/dgg/htdocs/drupal7/index.php(21): menu_execute_active_handler()
#24
Sorry but we are not able to provide this at the moment.
DB Error:
Error Details
Database Error Code: Duplicate entry '629' for key 'PRIMARY', 1062
Additional Details:
Array
(
[callback] => Array
(
[0] => CRM_Core_Error
[1] => handle
)
[code] => -1
[message] => DB Error:
[mode] => 16
[debug_info] => 1062 ** Duplicate entry '629' for key 'PRIMARY' [DB Error: unknown error]
[type] => DB_Error
[user_info] => 1062 ** Duplicate entry '629' for key 'PRIMARY' [DB Error: unknown error]
[to_string] => [db_error: message="DB Error: " code=-1 mode=callback callback=CRM_Core_Error::handle prefix="" info="1062 ** Duplicate entry '629' for key 'PRIMARY' [DB Error: unknown error]"]
)