Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Major
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.4.0
-
Fix Version/s: 4.4.0
-
Component/s: Core CiviCRM
-
Labels:None
Description
Steps to reproduce:
1. Enable detailed logging in "Administer => System Settings => Undelete, Logging, and ReCAPTCHA"
2. Open a contact record
3. Open the tab "Change Log"
4. Observe: "Database Error Code: Table 'newdomain.log_civicrm_activity_target' doesn't exist, 1146"
Additional Details:
Array
(
[callback] => Array
(
[0] => CRM_Core_Error
[1] => handle
)
[code] => -18
[message] => DB Error: no such table
[mode] => 16
[debug_info] => INSERT IGNORE INTO civicrm_temp_civireport_logsummary SELECT entity_log_civireport.id as log_civicrm_entity_id, entity_log_civireport.log_action as log_civicrm_entity_log_action, 'log_civicrm_activity_for_target' as log_civicrm_entity_log_type, entity_log_civireport.log_user_id as log_civicrm_entity_log_user_id, entity_log_civireport.log_date as log_civicrm_entity_log_date, modified_contact_civireport.display_name as log_civicrm_entity_altered_contact, modified_contact_civireport.id as log_civicrm_entity_altered_contact_id, entity_log_civireport.log_conn_id as log_civicrm_entity_log_conn_id, modified_contact_civireport.is_deleted as log_civicrm_entity_is_deleted, altered_by_contact_civireport.display_name as altered_by_contact_display_name
FROM `newdomain`.log_civicrm_activity entity_log_civireport
INNER JOIN `newdomain`.log_civicrm_activity_target fk_table ON entity_log_civireport.id = fk_table.activity_id
INNER JOIN civicrm_contact modified_contact_civireport
ON (fk_table.target_contact_id = modified_contact_civireport.id )
LEFT JOIN civicrm_contact altered_by_contact_civireport
ON (entity_log_civireport.log_user_id = altered_by_contact_civireport.id) WHERE ( modified_contact_civireport.id = 18 ) AND ( modified_contact_civireport.id = 18 ) AND ( modified_contact_civireport.id = 18 ) AND ( modified_contact_civireport.id = 18 ) AND ( modified_contact_civireport.id = 18 ) AND ( modified_contact_civireport.id = 18 ) AND ( modified_contact_civireport.id = 18 ) AND ( modified_contact_civireport.id = 18 ) AND ( modified_contact_civireport.id = 18 ) AND ( modified_contact_civireport.id = 18 ) AND (entity_log_civireport.log_action != 'Initialization') GROUP BY entity_log_civireport.log_conn_id, entity_log_civireport.log_user_id, EXTRACT(DAY_MICROSECOND FROM entity_log_civireport.log_date), entity_log_civireport.id [nativecode=1146 ** Table 'newdomain.log_civicrm_activity_target' doesn't exist]
[type] => DB_Error
[user_info] => INSERT IGNORE INTO civicrm_temp_civireport_logsummary SELECT entity_log_civireport.id as log_civicrm_entity_id, entity_log_civireport.log_action as log_civicrm_entity_log_action, 'log_civicrm_activity_for_target' as log_civicrm_entity_log_type, entity_log_civireport.log_user_id as log_civicrm_entity_log_user_id, entity_log_civireport.log_date as log_civicrm_entity_log_date, modified_contact_civireport.display_name as log_civicrm_entity_altered_contact, modified_contact_civireport.id as log_civicrm_entity_altered_contact_id, entity_log_civireport.log_conn_id as log_civicrm_entity_log_conn_id, modified_contact_civireport.is_deleted as log_civicrm_entity_is_deleted, altered_by_contact_civireport.display_name as altered_by_contact_display_name
FROM `newdomain`.log_civicrm_activity entity_log_civireport
INNER JOIN `newdomain`.log_civicrm_activity_target fk_table ON entity_log_civireport.id = fk_table.activity_id
INNER JOIN civicrm_contact modified_contact_civireport
ON (fk_table.target_contact_id = modified_contact_civireport.id )
LEFT JOIN civicrm_contact altered_by_contact_civireport
ON (entity_log_civireport.log_user_id = altered_by_contact_civireport.id) WHERE ( modified_contact_civireport.id = 18 ) AND ( modified_contact_civireport.id = 18 ) AND ( modified_contact_civireport.id = 18 ) AND ( modified_contact_civireport.id = 18 ) AND ( modified_contact_civireport.id = 18 ) AND ( modified_contact_civireport.id = 18 ) AND ( modified_contact_civireport.id = 18 ) AND ( modified_contact_civireport.id = 18 ) AND ( modified_contact_civireport.id = 18 ) AND ( modified_contact_civireport.id = 18 ) AND (entity_log_civireport.log_action != 'Initialization') GROUP BY entity_log_civireport.log_conn_id, entity_log_civireport.log_user_id, EXTRACT(DAY_MICROSECOND FROM entity_log_civireport.log_date), entity_log_civireport.id [nativecode=1146 ** Table 'newdomain.log_civicrm_activity_target' doesn't exist]
[to_string] => [db_error: message="DB Error: no such table" code=-18 mode=callback callback=CRM_Core_Error::handle prefix="" info="INSERT IGNORE INTO civicrm_temp_civireport_logsummary SELECT entity_log_civireport.id as log_civicrm_entity_id, entity_log_civireport.log_action as log_civicrm_entity_log_action, 'log_civicrm_activity_for_target' as log_civicrm_entity_log_type, entity_log_civireport.log_user_id as log_civicrm_entity_log_user_id, entity_log_civireport.log_date as log_civicrm_entity_log_date, modified_contact_civireport.display_name as log_civicrm_entity_altered_contact, modified_contact_civireport.id as log_civicrm_entity_altered_contact_id, entity_log_civireport.log_conn_id as log_civicrm_entity_log_conn_id, modified_contact_civireport.is_deleted as log_civicrm_entity_is_deleted, altered_by_contact_civireport.display_name as altered_by_contact_display_name
FROM `newdomain`.log_civicrm_activity entity_log_civireport
INNER JOIN `newdomain`.log_civicrm_activity_target fk_table ON entity_log_civireport.id = fk_table.activity_id
INNER JOIN civicrm_contact modified_contact_civireport
ON (fk_table.target_contact_id = modified_contact_civireport.id )
LEFT JOIN civicrm_contact altered_by_contact_civireport
ON (entity_log_civireport.log_user_id = altered_by_contact_civireport.id) WHERE ( modified_contact_civireport.id = 18 ) AND ( modified_contact_civireport.id = 18 ) AND ( modified_contact_civireport.id = 18 ) AND ( modified_contact_civireport.id = 18 ) AND ( modified_contact_civireport.id = 18 ) AND ( modified_contact_civireport.id = 18 ) AND ( modified_contact_civireport.id = 18 ) AND ( modified_contact_civireport.id = 18 ) AND ( modified_contact_civireport.id = 18 ) AND ( modified_contact_civireport.id = 18 ) AND (entity_log_civireport.log_action != 'Initialization') GROUP BY entity_log_civireport.log_conn_id, entity_log_civireport.log_user_id, EXTRACT(DAY_MICROSECOND FROM entity_log_civireport.log_date), entity_log_civireport.id [nativecode=1146 ** Table 'newdomain.log_civicrm_activity_target' doesn't exist]"]
)
I believe the problem is in CRM/Logging/ReportSummary.php
Attachments
Issue Links
- supplements
-
CRM-12274 Merge activity tables into one unified table activity contact table
- Done/Fixed