1

System: WordPress 5.3.2, CiviCRM 5.20.2, PHP 7.1.33

Problem: Since 1/1/2020 at 12:00am, every time our cron job runs on the hour I get an email notification that says

DB Error: no such field Died during callApi

In looking at the error log (shown below), the error is in an UPDATE statement on the civicrm_status_pref table, saying that the is_active field doesn't exist. But it does:

Structure of civicrm_status_prefs

I am not getting any other errors. System Status says that I'm a little behind with the PHP version and CiviCRM (but the error has persisted through one civi update). All extensions are up to date. And as near as I can tell, everything in CiviCRM is working fine.

What am I missing? Why am I getting this error? Thanks!

Error Log:

Feb 17 16:00:02  [error] $Fatal Error Details = Array
    (
        [callback] => Array
            (
                [0] => CRM_Core_Error
                [1] => exceptionHandler
            )

        [code] => -19
        [message] => DB Error: no such field
        [mode] => 16
        [debug_info] => UPDATE  civicrm_status_pref  SET domain_id = 1 , name = 'checkLastCron' , ignore_severity = 0 , check_info = '1581987602' , is_active = 1   WHERE (  civicrm_status_pref.id = 1 )   [nativecode=1054 ** Unknown column 'is_active' in 'field list']
        [type] => DB_Error
        [user_info] => UPDATE  civicrm_status_pref  SET domain_id = 1 , name = 'checkLastCron' , ignore_severity = 0 , check_info = '1581987602' , is_active = 1   WHERE (  civicrm_status_pref.id = 1 )   [nativecode=1054 ** Unknown column 'is_active' in 'field list']
        [to_string] => [db_error: message="DB Error: no such field" code=-19 mode=callback callback=CRM_Core_Error::exceptionHandler prefix="" info="UPDATE  civicrm_status_pref  SET domain_id = 1 , name = 'checkLastCron' , ignore_severity = 0 , check_info = '1581987602' , is_active = 1   WHERE (  civicrm_status_pref.id = 1 )   [nativecode=1054 ** Unknown column 'is_active' in 'field list']"]
    )


    Feb 17 16:00:02  [debug] $backTrace = #0 /home/thefolks/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php(921): CRM_Core_Error::backtrace("backTrace", TRUE)
    #1 /home/thefolks/public_html/wp-content/plugins/civicrm/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(922): CRM_Core_Error::exceptionHandler(Object(DB_Error))
    #2 /home/thefolks/public_html/wp-content/plugins/civicrm/civicrm/packages/DB.php(987): PEAR_Error->__construct("DB Error: no such field", -19, 16, (Array:2), "UPDATE  civicrm_status_pref  SET domain_id = 1 , name = 'checkLastCron' , ign...")
    #3 /home/thefolks/public_html/wp-content/plugins/civicrm/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(575): DB_Error->__construct(-19, 16, (Array:2), "UPDATE  civicrm_status_pref  SET domain_id = 1 , name = 'checkLastCron' , ign...")
    #4 /home/thefolks/public_html/wp-content/plugins/civicrm/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(223): PEAR->_raiseError(Object(DB_mysqli), NULL, -19, 16, (Array:2), "UPDATE  civicrm_status_pref  SET domain_id = 1 , name = 'checkLastCron' , ign...", "DB_Error", TRUE)
    #5 /home/thefolks/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/common.php(1920): PEAR->__call("raiseError", (Array:7))
    #6 /home/thefolks/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/mysqli.php(933): DB_common->raiseError(-19, NULL, NULL, "UPDATE  civicrm_status_pref  SET domain_id = 1 , name = 'checkLastCron' , ign...", "1054 ** Unknown column 'is_active' in 'field list'")
    #7 /home/thefolks/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/mysqli.php(403): DB_mysqli->mysqliRaiseError()
    #8 /home/thefolks/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/common.php(1229): DB_mysqli->simpleQuery("UPDATE  civicrm_status_pref  SET domain_id = 1 , name = 'checkLastCron' , ign...")
    #9 /home/thefolks/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php(2416): DB_common->query("UPDATE  civicrm_status_pref  SET domain_id = 1 , name = 'checkLastCron' , ign...")
    #10 /home/thefolks/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php(1318): DB_DataObject->_query("UPDATE  civicrm_status_pref  SET domain_id = 1 , name = 'checkLastCron' , ign...")
    #11 /home/thefolks/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(560): DB_DataObject->update()
    #12 /home/thefolks/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/BAO/StatusPreference.php(86): CRM_Core_DAO->save()
    #13 /home/thefolks/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/JobManager.php(93): CRM_Core_BAO_StatusPreference::create((Array:3))
    #14 /home/thefolks/public_html/wp-content/plugins/civicrm/civicrm/api/v3/Job.php(134): CRM_Core_JobManager->execute(FALSE)
    #15 /home/thefolks/public_html/wp-content/plugins/civicrm/civicrm/Civi/API/Provider/MagicFunctionProvider.php(101): civicrm_api3_job_execute((Array:2))
    #16 /home/thefolks/public_html/wp-content/plugins/civicrm/civicrm/Civi/API/Kernel.php(168): Civi\API\Provider\MagicFunctionProvider->invoke((Array:9))
    #17 /home/thefolks/public_html/wp-content/plugins/civicrm/civicrm/Civi/API/Kernel.php(99): Civi\API\Kernel->runRequest((Array:9))
    #18 /home/thefolks/public_html/wp-content/plugins/civicrm/civicrm/api/api.php(23): Civi\API\Kernel->runSafe("Job", "execute", (Array:2), NULL)
    #19 /home/thefolks/public_html/wp-content/plugins/civicrm/civicrm/bin/cli.class.php(122): civicrm_api("Job", "execute", (Array:2))
    #20 /home/thefolks/public_html/wp-content/plugins/civicrm/civicrm/bin/cli.php(32): civicrm_cli->callApi()
    #21 {main}
2

DO you have DB logging turned on? If so turn it off & back on again - the log_civicrm_status_pref table might be missing the field

|improve this answer|||||
  • I do indeed have logging turned on. Turning it off and back on didn't do anything, but manually adding the field to log_civicrm_status_pref seems to have done it. Thanks! – RiverRunner Feb 20 at 6:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.