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

fatal error if I try to log queries in 4.7

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Critical
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.7
    • Fix Version/s: 4.7
    • Component/s: None
    • Labels:
      None
    • Documentation Required?:
      Developer Doc
    • Funding Source:
      Core Team Funds

      Description

      Hey Tim,

      If I add

      define('CIVICRM_DEBUG_LOG_QUERY', 1);

      to the bottom of my CiviCRM.settings.php file in laster 4.7 I get a fatal - not sure if there is a new recommended way to do this that I need to switch to?

      For the record in the past
      define('CIVICRM_DEBUG_LOG_QUERY', 1);
      logged all queries to the civicrm log and

      define('CIVICRM_DEBUG_LOG_QUERY', 'backtrace');

      caused them to include a backtrace.

      I just did a fresh civibuild create & it persists so I don't think it's my setup

      Fatal error: Call to a member function getBagByDomain() on a non-object in /Users/emcnaughton/buildkit/build/dmaster/sites/all/modules/civicrm/Civi.php on line 115
      Call Stack

      1. Time Memory Function Location
        1 0.0006 236656 {main}

        ( ) ../index.php:0
        2 0.2742 14483360 menu_execute_active_handler( ) ../index.php:21
        3 0.2743 14484288 call_user_func_array:

        {/Users/emcnaughton/buildkit/build/dmaster/includes/menu.inc:519}

        ( ) ../menu.inc:519
        4 0.2743 14484632 civicrm_invoke( ) ../menu.inc:519
        5 0.2743 14484832 civicrm_initialize( ) ../civicrm.module:380
        6 0.3187 15214608 CRM_Core_Config::singleton( ) ../civicrm.module:220
        7 0.3440 15854480 Civi\Core\Container::boot( ) ../Config.php:90
        8 0.3853 17414440 CRM_Core_DAO::init( ) ../Container.php:339
        9 0.3995 17763416 CRM_Core_DAO::executeQuery( ) ../DAO.php:109
        10 0.3996 17764296 CRM_Core_DAO->__construct( ) ../DAO.php:1178
        11 0.3996 17764344 CRM_Core_DAO->initialize( ) ../DAO.php:84
        12 0.3996 17766056 DB_DataObject->_connect( ) ../DAO.php:356
        13 0.4184 18392992 CRM_Core_DAO->query( ) ../DataObject.php:2325
        14 0.4184 18393224 DB_DataObject->query( ) ../DAO.php:325
        15 0.4185 18394120 DB_DataObject->_query( ) ../DataObject.php:1627
        16 0.4185 18394352 CRM_Core_Error::debug_query( ) ../DataObject.php:2373
        17 0.4186 18394584 CRM_Core_Error::debug_var( ) ../Error.php:608
        18 0.4186 18395296 CRM_Core_Error::debug_log_message( ) ../Error.php:560
        19 0.4226 18459744 CRM_Core_Config_MagicMerge->__get( ) ../Error.php:589
        20 0.4226 18459824 CRM_Core_Config_MagicMerge->getSettings( ) ../MagicMerge.php:216
        21 0.4226 18459872 Civi::settings( ) ../MagicMerge.php:346

        Attachments

          Activity

            People

            • Assignee:
              eileen Eileen McNaughton
              Reporter:
              eileen Eileen McNaughton
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: