Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-19619

Viewing log actions DB error with custom groups and multi-lingual

    Details

    • Versioning Impact:
      Patch (backwards-compatible bug fixes)
    • Documentation Required?:
      None
    • Funding Source:
      Needs Funding

      Description

      After enabling logging on a multi-lingual install, (Thank you that it's possible now!), a contact merge was done. Going to the Merged Contact Change Log shows the merge. Clicking on the Contact Merge Action, gives a DB error of no such table if the contact is member of a custom group.

      Nov 08 10:53:15 [info] $Fatal Error Details = Array
      (
      [callback] => Array
      (
      [0] => CRM_Core_Error
      [1] => handle
      )

      [code] => -18
      [message] => DB Error: no such table
      [mode] => 16
      [debug_info] => SELECT id, title FROM `civicrm`.log_civicrm_custom_group_en_US WHERE log_date <= '2016-11-08 10:52:23' AND table_name = 'civicrm_value_s360_legacy_data_1' ORDER BY log_date DESC LIMIT 1 [nativecode=1146 ** Table 'civicrm.log_civicrm_custom_group_en_US' doesn't exist]
      [type] => DB_Error
      [user_info] => SELECT id, title FROM `civicrm`.log_civicrm_custom_group_en_US WHERE log_date <= '2016-11-08 10:52:23' AND table_name = 'civicrm_value_s360_legacy_data_1' ORDER BY log_date DESC LIMIT 1 [nativecode=1146 ** Table 'civicrm.log_civicrm_custom_group_en_US' doesn't exist]
      [to_string] => [db_error: message="DB Error: no such table" code=-18 mode=callback callback=CRM_Core_Error::handle prefix="" info="SELECT id, title FROM `civicrm`.log_civicrm_custom_group_en_US WHERE log_date <= '2016-11-08 10:52:23' AND table_name = 'civicrm_value_s360_legacy_data_1' ORDER BY log_date DESC LIMIT 1 [nativecode=1146 ** Table 'civicrm.log_civicrm_custom_group_en_US' doesn't exist]"]
      )

      Nov 08 10:53:15 [info] $backTrace = #0 /dir/to/wp/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php(229): CRM_Core_Error::backtrace("backTrace", TRUE)
      #1 [internal function](): CRM_Core_Error::handle(Object(DB_Error))
      #2 /dir/to/wp/wp-content/plugins/civicrm/civicrm/packages/PEAR.php(921): call_user_func((Array:2), Object(DB_Error))
      #3 /dir/to/wp/wp-content/plugins/civicrm/civicrm/packages/DB.php(985): PEAR_Error->__construct("DB Error: no such table", -18, 16, (Array:2), "SELECT id, title FROM `civicrm`.log_civicrm_custom_group_en_US WHERE log_date...")
      #4 /dir/to/wp/wp-content/plugins/civicrm/civicrm/packages/PEAR.php(575): DB_Error->__construct(-18, 16, (Array:2), "SELECT id, title FROM `civicrm`.log_civicrm_custom_group_en_US WHERE log_date...")
      #5 [internal function](): PEAR->_raiseError(Object(DB_mysqli), NULL, -18, NULL, NULL, "SELECT id, title FROM `civicrm`.log_civicrm_custom_group_en_US WHERE log_date...", "DB_Error", TRUE)
      #6 /dir/to/wp/wp-content/plugins/civicrm/civicrm/packages/PEAR.php(224): call_user_func_array((Array:2), (Array:8))
      #7 /dir/to/wp/wp-content/plugins/civicrm/civicrm/packages/DB/common.php(1905): PEAR->__call("raiseError", (Array:7))
      #8 /dir/to/wp/wp-content/plugins/civicrm/civicrm/packages/DB/common.php(1905): PEAR->raiseError(NULL, -18, NULL, NULL, "SELECT id, title FROM `civicrm`.log_civicrm_custom_group_en_US WHERE log_date...", "DB_Error", TRUE)
      #9 /dir/to/wp/wp-content/plugins/civicrm/civicrm/packages/DB/mysqli.php(933): DB_common->raiseError(-18, NULL, NULL, NULL, "1146 ** Table 'civicrm.log_civicrm_custom_group_en_US' doesn't exist")
      #10 /dir/to/wp/wp-content/plugins/civicrm/civicrm/packages/DB/mysqli.php(403): DB_mysqli->mysqliRaiseError()
      #11 /dir/to/wp/wp-content/plugins/civicrm/civicrm/packages/DB/common.php(1216): DB_mysqli->simpleQuery("SELECT id, title FROM `civicrm`.log_civicrm_custom_group_en_US WHERE log_date...")
      #12 /dir/to/wp/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php(2438): DB_common->query("SELECT id, title FROM `civicrm`.log_civicrm_custom_group_en_US WHERE log_date...")
      #13 /dir/to/wp/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php(1627): DB_DataObject->_query("SELECT id, title FROM `civicrm`.log_civicrm_custom_group_en_US WHERE log_date...")
      #14 /dir/to/wp/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(349): DB_DataObject->query("SELECT id, title FROM `civicrm`.log_civicrm_custom_group_en_US WHERE log_date...")
      #15 /dir/to/wp/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(1292): CRM_Core_DAO->query("SELECT id, title FROM `civicrm`.log_civicrm_custom_group WHERE log_date <= '2...", TRUE)
      #16 /dir/to/wp/wp-content/plugins/civicrm/civicrm/CRM/Logging/Differ.php(374): CRM_Core_DAO::executeQuery("SELECT id, title FROM `civicrm`.log_civicrm_custom_group WHERE log_date <= %2...", (Array:3))
      #17 /dir/to/wp/wp-content/plugins/civicrm/civicrm/CRM/Logging/Differ.php(333): CRM_Logging_Differ->titlesAndValuesForCustomDataTable("civicrm_value_s360_legacy_data_1", "2016-11-08 10:52:23")
      #18 /dir/to/wp/wp-content/plugins/civicrm/civicrm/CRM/Logging/ReportDetail.php(191): CRM_Logging_Differ->titlesAndValuesForTable("civicrm_value_s360_legacy_data_1", "2016-11-08 10:52:23")
      #19 /dir/to/wp/wp-content/plugins/civicrm/civicrm/CRM/Logging/ReportDetail.php(145): CRM_Logging_ReportDetail->convertDiffsToRows()
      #20 /dir/to/wp/wp-content/plugins/civicrm/civicrm/CRM/Report/Form.php(3297): CRM_Logging_ReportDetail->buildRows(NULL, (Array:0))
      #21 /dir/to/wp/wp-content/plugins/civicrm/civicrm/CRM/Report/Form.php(855): CRM_Report_Form->postProcess()
      #22 /dir/to/wp/wp-content/plugins/civicrm/civicrm/CRM/Core/Form.php(527): CRM_Report_Form->preProcess()
      #23 /dir/to/wp/wp-content/plugins/civicrm/civicrm/CRM/Core/QuickForm/Action/Display.php(92): CRM_Core_Form->buildForm()
      #24 /dir/to/wp/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Display->perform(Object(CRM_Report_Form_Contact_LoggingDetail), "display")
      #25 /dir/to/wp/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Report_Form_Contact_LoggingDetail), "display")
      #26 /dir/to/wp/wp-content/plugins/civicrm/civicrm/CRM/Core/Controller.php(351): HTML_QuickForm_Page->handle("display")
      #27 /dir/to/wp/wp-content/plugins/civicrm/civicrm/CRM/Utils/Wrapper.php(113): CRM_Core_Controller->run()
      #28 /dir/to/wp/wp-content/plugins/civicrm/civicrm/CRM/Report/Page/Instance.php(89): CRM_Utils_Wrapper->run("CRM_Report_Form_Contact_LoggingDetail", NULL, NULL)
      #29 /dir/to/wp/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(312): CRM_Report_Page_Instance->run((Array:4), NULL)
      #30 /dir/to/wp/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(86): CRM_Core_Invoke::runItem((Array:14))
      #31 /dir/to/wp/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(54): CRM_Core_Invoke::_invoke((Array:4))
      #32 /dir/to/wp/wp-content/plugins/civicrm/civicrm.php(1227): CRM_Core_Invoke::invoke((Array:4))
      #33 [internal function](): CiviCRM_For_WordPress->invoke("")
      #34 /dir/to/wp/wp-includes/plugin.php(524): call_user_func_array((Array:2), (Array:1))
      #35 /dir/to/wp/wp-admin/admin.php(222): do_action("toplevel_page_CiviCRM")
      #36

      {main}

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              gharris G H
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: