CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Discussion (deprecated) »
  • Alpha and Beta Release Testing »
  • 3.4 and 4.0 Releases Testing »
  • Attempting to turn on logging and getting 'Query was empty'
Pages: [1]

Author Topic: Attempting to turn on logging and getting 'Query was empty'  (Read 2267 times)

ken

  • I live on this forum
  • *****
  • Posts: 916
  • Karma: 53
    • City Bible Forum
  • CiviCRM version: 4.6.3
  • CMS version: Drupal 7.36
  • MySQL version: 5.5.41
  • PHP version: 5.3.10
Attempting to turn on logging and getting 'Query was empty'
March 27, 2011, 04:52:44 am
3.4.beta1

When I visit /civicrm/admin/setting/misc?reset=1 and try to enable logging, I get the following error ...

Quote
Mar 27 22:46:05  [info] $Fatal Error Details = Array
(
    [callback] => Array
        (
            [ 0 ] => CRM_Core_Error
            [ 1 ] => handle
        )

    [ code ] => a515ac9c2796ca0e23adbe92c68fc9fc
    [message] => DB Error: a515ac9c2796ca0e23adbe92c68fc9fc
    [mode] => 16
    [debug_info] =>  [nativecode=1065 ** Query was empty]
    [type] => DB_Error
    [user_info] =>  [nativecode=1065 ** Query was empty]
    [to_string] => [db_error: message="DB Error: a515ac9c2796ca0e23adbe92c68fc9fc" code=0 mode=callback callback=CRM_Core_Error::handle prefix="" info=" [nativecode=1065 **
 Query was empty]"]
)


Mar 27 22:46:05  [info] $backTrace = //sites/all/modules/civicrm/CRM/Core/Error.php, backtrace, 205
, handle,
//sites/all/modules/civicrm/packages/PEAR.php, call_user_func, 931
//sites/all/modules/civicrm/packages/DB.php, PEAR_Error, 971
//sites/all/modules/civicrm/packages/PEAR.php, DB_Error, 564
//sites/all/modules/civicrm/packages/DB/common.php, raiseError, 1903
//sites/all/modules/civicrm/packages/DB/mysql.php, raiseError, 898
//sites/all/modules/civicrm/packages/DB/mysql.php, mysqlRaiseError, 327
//sites/all/modules/civicrm/packages/DB/common.php, simpleQuery, 1216
//sites/all/modules/civicrm/packages/DB/DataObject.php, query, 2420
//sites/all/modules/civicrm/packages/DB/DataObject.php, _query, 1606
//sites/all/modules/civicrm/CRM/Core/DAO.php, query, 145
//sites/all/modules/civicrm/CRM/Core/DAO.php, query, 868
//sites/all/modules/civicrm/CRM/Logging/Schema.php, executeQuery, 243
//sites/all/modules/civicrm/CRM/Logging/Schema.php, createLogTableFor, 103
//sites/all/modules/civicrm/CRM/Admin/Form/Setting/Miscellaneous.php, enableLogging, 96
//sites/all/modules/civicrm/CRM/Core/Form.php, postProcess, 250
//sites/all/modules/civicrm/CRM/Core/StateMachine.php, mainProcess, 167
//sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Next.php, perform, 64
//sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php, perform, 203
//sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php, handle, 103
//sites/all/modules/civicrm/CRM/Core/Controller.php, handle, 284
//sites/all/modules/civicrm/CRM/Utils/Wrapper.php, run, 115
//sites/all/modules/civicrm/CRM/Core/Invoke.php, run, 195
//sites/all/modules/civicrm/drupal/civicrm.module, invoke, 355
, civicrm_invoke,
//includes/menu.inc, call_user_func_array, 348
//index.php, menu_execute_active_handler, 18

Ken

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Attempting to turn on logging and getting 'Query was empty'
March 27, 2011, 07:38:43 pm

hey ken:

can u add some debug statements in Schema.php and see how/why it gets and empty table

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

ken

  • I live on this forum
  • *****
  • Posts: 916
  • Karma: 53
    • City Bible Forum
  • CiviCRM version: 4.6.3
  • CMS version: Drupal 7.36
  • MySQL version: 5.5.41
  • PHP version: 5.3.10
Re: Attempting to turn on logging and getting 'Query was empty'
March 28, 2011, 02:25:44 am
It is failing on the view civicrm_domain_view. I guess the code should ignore views?

The line ...
Code: [Select]
$query = $dao->Create_Table;
... sets $query to NULL, leading to the exception. The CREATE VIEW code is stored in $dao->Create_View

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Attempting to turn on logging and getting 'Query was empty'
March 28, 2011, 06:14:12 am

Is this a multi-lingual site? logging currently does not work on multi-lingual sites

wondering who created that view?

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

ken

  • I live on this forum
  • *****
  • Posts: 916
  • Karma: 53
    • City Bible Forum
  • CiviCRM version: 4.6.3
  • CMS version: Drupal 7.36
  • MySQL version: 5.5.41
  • PHP version: 5.3.10
Re: Attempting to turn on logging and getting 'Query was empty'
March 28, 2011, 09:45:56 pm
Lobo,

It's not multi-lingual. Can I just delete this view? (I can't see any reference to it in the code.)

The view is defined by the following SQL ...
Code: [Select]
select `civicrm_domain`.`id` AS `id`,`civicrm_domain`.`name` AS `name`,`civicrm_domain`.`description` AS `description`,`civicrm_domain`.`config_backend` AS `config_backend`,`civicrm_domain`.`version` AS `version`,`civicrm_domain`.`loc_block_id` AS `loc_block_id`,`civicrm_domain`.`locales` AS `locales`,`civicrm_domain`.`locale_custom_strings` AS `locale_custom_strings` from `civicrm_domain`
Ken

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Attempting to turn on logging and getting 'Query was empty'
March 28, 2011, 10:08:26 pm

yes, seems like its a leftover view from some older code (which potentially had a bug on cleanup)

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

ken

  • I live on this forum
  • *****
  • Posts: 916
  • Karma: 53
    • City Bible Forum
  • CiviCRM version: 4.6.3
  • CMS version: Drupal 7.36
  • MySQL version: 5.5.41
  • PHP version: 5.3.10
Re: Attempting to turn on logging and getting 'Query was empty'
March 29, 2011, 03:06:37 pm
Just to close the loop, after removing the extraneous view I've successfully turned on logging and am playing with it!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Discussion (deprecated) »
  • Alpha and Beta Release Testing »
  • 3.4 and 4.0 Releases Testing »
  • Attempting to turn on logging and getting 'Query was empty'

This forum was archived on 2017-11-26.