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) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Problem with logging upon upgrade to 4.4 from 4.3.5
Pages: [1]

Author Topic: Problem with logging upon upgrade to 4.4 from 4.3.5  (Read 911 times)

Stuart Parker

  • I post occasionally
  • **
  • Posts: 64
  • Karma: 2
  • CiviCRM version: 4.5.2
  • CMS version: Drupal 7
  • MySQL version: 5.1.63
  • PHP version: 5.2.14
Problem with logging upon upgrade to 4.4 from 4.3.5
October 25, 2013, 03:59:06 am
I have enabled logging upon upgrading to 4.4.0 from 4.3.5. When I try to look at a logging report, I get this error:
Quote
[nativecode=1054 ** Unknown column 'activity_civireport.source_contact_id' in 'field list'] [to_string] => [db_error: message="DB Error: no such field" code=-19 mode=callback callback=CRM_Core_Error::handle prefix="" info="SELECT SQL_CALC_FOUND_ROWS contact_civireport.sort_name as civicrm_contact_sort_name, contact_civireport.id as civicrm_contact_id, contact_touched_civireport.sort_name as civicrm_contact_touched_sort_name_touched, contact_touched_civireport.id as civicrm_contact_touched_id, activity_civireport.id as civicrm_activity_id, activity_civireport.subject as civicrm_activity_subject, activity_civireport.activity_type_id as civicrm_activity_activity_type_id, activity_civireport.source_contact_id as civicrm_activity_source_contact_id, log_civireport.modified_date as civicrm_log_modified_date FROM civicrm_log log_civireport inner join civicrm_contact contact_civireport on log_civireport.modified_id = contact_civireport.id left join civicrm_contact contact_touched_civireport on (log_civireport.entity_table='civicrm_contact' AND log_civireport.entity_id = contact_touched_civireport.id) left join civicrm_activity activity_civireport on (log_civireport.entity_table='civicrm_activity' AND log_civireport.entity_id = activity_civireport.id) WHERE ( log_civireport.modified_date >= 20131020000000 ) AND ( log_civireport.modified_date <= 20131026235959 ) AND (log_civireport.entity_table <> 'civicrm_domain') ORDER BY log_civireport.modified_date DESC, contact_civireport.sort_name, contact_touched_civireport.sort_name LIMIT 0, 100 [nativecode=1054 ** Unknown column 'activity_civireport.source_contact_id' in 'field list']"] )

Does anyone know where the problem is? ???

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: Problem with logging upon upgrade to 4.4 from 4.3.5
October 25, 2013, 08:12:53 am

seems like some logging reports did not get converted to the new activity structure. Can you please file an issue, we'll take a look at it and fix it for the next release

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

Deepak Srivastava

  • Moderator
  • Ask me questions
  • *****
  • Posts: 677
  • Karma: 65
Re: Problem with logging upon upgrade to 4.4 from 4.3.5
October 28, 2013, 01:41:53 am
Filed an issue here - http://issues.civicrm.org/jira/browse/CRM-13658.

Seems like its "Database Log Report" that's broken. Other log reports seem to work.
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

Stuart Parker

  • I post occasionally
  • **
  • Posts: 64
  • Karma: 2
  • CiviCRM version: 4.5.2
  • CMS version: Drupal 7
  • MySQL version: 5.1.63
  • PHP version: 5.2.14
Re: Problem with logging upon upgrade to 4.4 from 4.3.5
October 28, 2013, 07:28:11 am
I had another problem with reactivating logging (via Admin/System Settings/Misc) after upgrading to 4.4.0

It came up with another error:

Quote
$Fatal Error Details = Array (  => Array (
  • => CRM_Core_Error [1] => handle ) => -18 [message] => DB Error: no such table [mode] => 16 [debug_info] => SHOW CREATE TABLE log_civicrm_contribution_page [nativecode=1146 ** Table '###.log_civicrm_contribution_page' doesn't exist] [type] => DB_Error [user_info] => SHOW CREATE TABLE log_civicrm_contribution_page [nativecode=1146 ** Table '###.log_civicrm_contribution_page' doesn't exist] [to_string] => [db_error: message="DB Error: no such table" code=-18 mode=callback callback=CRM_Core_Error::handle prefix="" info="SHOW CREATE TABLE log_civicrm_contribution_page [nativecode=1146 ** Table '###.log_civicrm_contribution_page' doesn't exist]"] )
The problem seems to be that the table name (which I replaced above with ###) is the main Civi database table and not the Civi log table (which I have checked is correctly described in my civicrm.settings.php)

Here is part of the backtrace:

Quote
#13 .../civicrm/CRM/Logging/Schema.php(264): CRM_Core_DAO::executeQuery("SHOW CREATE TABLE log_civicrm_contribution_page")
#14 .../civicrm/CRM/Logging/Schema.php(248): CRM_Logging_Schema->_getCreateQuery("log_civicrm_contribution_page")
#15 .../CRM/Logging/Schema.php(289): CRM_Logging_Schema->fixSchemaDifferencesFor("civicrm_contribution_page", (Array:3), FALSE)
#16 .../civicrm/CRM/Logging/Schema.php(207): CRM_Logging_Schema->fixSchemaDifferencesForAll()
#17 .../civicrm/CRM/Logging/Schema.php(190): CRM_Logging_Schema->fixSchemaDifferences(TRUE) #18

Following Deepak Srivastava's suggestion, I disabled logging, dropped the log_civicrm_contribution_page table manually from db and re-enabled logging. After repeating this for the following tables, it eventually stopped producing errors: ::)
  • log_civicrm_contribution_page
  • log_civicrm_entity_financial_trxn
  • log_civicrm_financial_account
  • log_civicrm_membership_status

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: Problem with logging upon upgrade to 4.4 from 4.3.5
October 28, 2013, 08:27:26 am

1. do u have your original 4.3.5 DB still around? might be good to verify those tables exist and if logging is working

2. can u repeat the experiment with a clean install of 4.4

thanx

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

Stuart Parker

  • I post occasionally
  • **
  • Posts: 64
  • Karma: 2
  • CiviCRM version: 4.5.2
  • CMS version: Drupal 7
  • MySQL version: 5.1.63
  • PHP version: 5.2.14
Re: Problem with logging upon upgrade to 4.4 from 4.3.5
October 29, 2013, 10:56:08 am
Sorry but I don't know how to get the 4.3.5 database back without overwriting the latest one

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Problem with logging upon upgrade to 4.4 from 4.3.5

This forum was archived on 2017-11-26.