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

Enabling logging crashes due to no DB name supplied to create table.

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: 4.3.0
    • Fix Version/s: 4.3.1
    • Component/s: Core CiviCRM
    • Labels:
      None

      Description

      Enabling logging on my newly upgraded 4.3.0 site (formerly 4.2.8) causes the following error:

      #0 /usr/local/www/ExampleSites/Site.Example.com/drupal-7.22/sites/all/modules/civicrm/CRM/Core/Error.php(148): CRM_Core_Error::backtrace()
      #1 [internal function](): CRM_Core_Error::handle(Object(DB_Error))
      #2 /usr/local/www/ExampleSites/Site.Example.com/drupal-7.22/sites/all/modules/civicrm/packages/PEAR.php(931): call_user_func((Array:2), Object(DB_Error))
      #3 /usr/local/www/ExampleSites/Site.Example.com/drupal-7.22/sites/all/modules/civicrm/packages/DB.php(969): PEAR_Error->PEAR_Error("DB Error: unknown error", -1, 16, (Array:2), "CREATE TABLE ``.log_civicrm_acl (\n `id` int(10) unsigned COMMENT 'Unique t...")
      #4 /usr/local/www/ExampleSites/Site.Example.com/drupal-7.22/sites/all/modules/civicrm/packages/PEAR.php(564): DB_Error->DB_Error(-1, 16, (Array:2), "CREATE TABLE ``.log_civicrm_acl (\n `id` int(10) unsigned COMMENT 'Unique t...")
      #5 /usr/local/www/ExampleSites/Site.Example.com/drupal-7.22/sites/all/modules/civicrm/packages/DB/common.php(1905): PEAR->raiseError(NULL, -1, NULL, NULL, "CREATE TABLE ``.log_civicrm_acl (\n `id` int(10) unsigned COMMENT 'Unique t...", "DB_Error", TRUE)
      #6 /usr/local/www/ExampleSites/Site.Example.com/drupal-7.22/sites/all/modules/civicrm/packages/DB/mysqli.php(928): DB_common->raiseError(-1, NULL, NULL, NULL, "1102 ** Incorrect database name ''")
      #7 /usr/local/www/ExampleSites/Site.Example.com/drupal-7.22/sites/all/modules/civicrm/packages/DB/mysqli.php(402): DB_mysqli->mysqliRaiseError()
      #8 /usr/local/www/ExampleSites/Site.Example.com/drupal-7.22/sites/all/modules/civicrm/packages/DB/common.php(1216): DB_mysqli->simpleQuery("CREATE TABLE ``.log_civicrm_acl (\n `id` int(10) unsigned COMMENT 'Unique t...")
      #9 /usr/local/www/ExampleSites/Site.Example.com/drupal-7.22/sites/all/modules/civicrm/packages/DB/DataObject.php(2421): DB_common->query("CREATE TABLE ``.log_civicrm_acl (\n `id` int(10) unsigned COMMENT 'Unique t...")
      #10 /usr/local/www/ExampleSites/Site.Example.com/drupal-7.22/sites/all/modules/civicrm/packages/DB/DataObject.php(1613): DB_DataObject->_query("CREATE TABLE ``.log_civicrm_acl (\n `id` int(10) unsigned COMMENT 'Unique t...")
      #11 /usr/local/www/ExampleSites/Site.Example.com/drupal-7.22/sites/all/modules/civicrm/CRM/Core/DAO.php(155): DB_DataObject->query("CREATE TABLE ``.log_civicrm_acl (\n `id` int(10) unsigned COMMENT 'Unique t...")
      #12 /usr/local/www/ExampleSites/Site.Example.com/drupal-7.22/sites/all/modules/civicrm/CRM/Core/DAO.php(917): CRM_Core_DAO->query("CREATE TABLE ``.log_civicrm_acl (\n `id` int(10) unsigned COMMENT 'Unique t...", TRUE)
      #13 /usr/local/www/ExampleSites/Site.Example.com/drupal-7.22/sites/all/modules/civicrm/CRM/Logging/Schema.php(317): CRM_Core_DAO::executeQuery("CREATE TABLE ``.log_civicrm_acl (\n `id` int(10) unsigned COMMENT 'Unique t...")
      #14 /usr/local/www/ExampleSites/Site.Example.com/drupal-7.22/sites/all/modules/civicrm/CRM/Logging/Schema.php(183): CRM_Logging_Schema->createLogTableFor("civicrm_acl")
      #15 /usr/local/www/ExampleSites/Site.Example.com/drupal-7.22/sites/all/modules/civicrm/CRM/Logging/Schema.php(165): CRM_Logging_Schema->fixSchemaDifferencesFor("civicrm_acl", (Array:11), FALSE)
      #16 /usr/local/www/ExampleSites/Site.Example.com/drupal-7.22/sites/all/modules/civicrm/CRM/Logging/Schema.php(147): CRM_Logging_Schema->fixSchemaDifferences(TRUE)
      #17 /usr/local/www/ExampleSites/Site.Example.com/drupal-7.22/sites/all/modules/civicrm/CRM/Admin/Form/Setting/Miscellaneous.php(122): CRM_Logging_Schema->enableLogging()
      #18 /usr/local/www/ExampleSites/Site.Example.com/drupal-7.22/sites/all/modules/civicrm/CRM/Core/Form.php(246): CRM_Admin_Form_Setting_Miscellaneous->postProcess()
      #19 /usr/local/www/ExampleSites/Site.Example.com/drupal-7.22/sites/all/modules/civicrm/CRM/Core/StateMachine.php(160): CRM_Core_Form->mainProcess()
      #20 /usr/local/www/ExampleSites/Site.Example.com/drupal-7.22/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Next.php(60): CRM_Core_StateMachine->perform(Object(CRM_Admin_Form_Setting_Miscellaneous), "next", "Next")
      #21 /usr/local/www/ExampleSites/Site.Example.com/drupal-7.22/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Next->perform(Object(CRM_Admin_Form_Setting_Miscellaneous), "next")
      #22 /usr/local/www/ExampleSites/Site.Example.com/drupal-7.22/sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Admin_Form_Setting_Miscellaneous), "next")
      #23 /usr/local/www/ExampleSites/Site.Example.com/drupal-7.22/sites/all/modules/civicrm/CRM/Core/Controller.php(316): HTML_QuickForm_Page->handle("next")
      #24 /usr/local/www/ExampleSites/Site.Example.com/drupal-7.22/sites/all/modules/civicrm/CRM/Utils/Wrapper.php(117): CRM_Core_Controller->run()
      #25 /usr/local/www/ExampleSites/Site.Example.com/drupal-7.22/sites/all/modules/civicrm/CRM/Core/Invoke.php(266): CRM_Utils_Wrapper->run("CRM_Admin_Form_Setting_Miscellaneous", "Undelete, Logging and ReCAPTCHA", NULL)
      #26 /usr/local/www/ExampleSites/Site.Example.com/drupal-7.22/sites/all/modules/civicrm/CRM/Core/Invoke.php(70): CRM_Core_Invoke::runItem((Array:13))
      #27 /usr/local/www/ExampleSites/Site.Example.com/drupal-7.22/sites/all/modules/civicrm/CRM/Core/Invoke.php(52): CRM_Core_Invoke::_invoke((Array:4))
      #28 /usr/local/www/ExampleSites/Site.Example.com/drupal-7.22/sites/all/modules/civicrm/drupal/civicrm.module(436): CRM_Core_Invoke::invoke((Array:4))
      #29 [internal function](): civicrm_invoke("admin", "setting", "misc")
      #30 /usr/local/www/ExampleSites/Site.Example.com/drupal-7.22/includes/menu.inc(517): call_user_func_array("civicrm_invoke", (Array:3))
      #31 /usr/local/www/ExampleSites/Site.Example.com/drupal-7.22/index.php(21): menu_execute_active_handler()
      #32

      {main}

        Attachments

          Activity

            People

            • Assignee:
              colemanw Coleman Watts
              Reporter:
              majortom Carmi Weinzweig
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: