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) »
  • Upgrade [Error: Consolidate activity contacts] - 4.3.5 to 4.4.3
Pages: [1]

Author Topic: Upgrade [Error: Consolidate activity contacts] - 4.3.5 to 4.4.3  (Read 1239 times)

mikem

  • I post occasionally
  • **
  • Posts: 70
  • Karma: 0
  • CiviCRM version: 4.4.3
  • CMS version: 7.X
Upgrade [Error: Consolidate activity contacts] - 4.3.5 to 4.4.3
December 19, 2013, 07:44:06 am
Well somehow i upgraded my Production DB instead of DEV DB. Now it has been a few days and i have backups but i need to keep the updates and information changes on the current production DB. I need to see if i can salvage my current database.

The only error message that i am getting is:
Quote
Database check failed - the database looks to have been partially upgraded. You may want to reload the database with the backup and try the upgrade process again.

-- Whenever i go to the admin console. Everything else seems to be working correctly and i have had no other issues.

Attached is a screenshot of the error message and below is the error output message that i got when upgrading the DB.

Any thoughts on if i should retry the upgrade or any way to salvage the upgrade?


Quote
[Error: Consolidate activity contacts]
Error Field   Error Value
Type   DB_Error
Code   -2
Message   DB Error: syntax error
Mode   16
UserInfo   UPDATE civicrm_option_value SET is_reserved = 1 WHERE option_group_id = 62 AND value IN (2, , 3) [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' 3)' at line 3]
DebugInfo   UPDATE civicrm_option_value SET is_reserved = 1 WHERE option_group_id = 62 AND value IN (2, , 3) [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' 3)' at line 3]
PEAR_Exception: DB Error: syntax error in unknown on line unknown
- DB_Error: DB Error: syntax error in unknown on line unknown
Exception trace
#   Function   Location
0   CRM_Core_Error::exceptionHandler(Object(DB_Error))   unknown:unknown
1   call_user_func(Array, Object(DB_Error))   /var/www/drupal7/sites/all/modules/civicrm/packages/PEAR.php:931
2   PEAR_Error->PEAR_Error('DB Error: syntax…', -2, 16, Array, ' UPDATE civicrm_…')   /var/www/drupal7/sites/all/modules/civicrm/packages/DB.php:969
3   DB_Error->DB_Error(-2, 16, Array, ' UPDATE civicrm_…')   /var/www/drupal7/sites/all/modules/civicrm/packages/PEAR.php:564
4   PEAR->raiseError(null, -2, null, null, ' UPDATE civicrm_…', 'DB_Error', true)   /var/www/drupal7/sites/all/modules/civicrm/packages/DB/common.php:1905
5   DB_common->raiseError(-2, null, null, null, '1064 ** You have…')   /var/www/drupal7/sites/all/modules/civicrm/packages/DB/mysql.php:898
6   DB_mysql->mysqlRaiseError()   /var/www/drupal7/sites/all/modules/civicrm/packages/DB/mysql.php:327
7   DB_mysql->simpleQuery(' UPDATE civicrm_…')   /var/www/drupal7/sites/all/modules/civicrm/packages/DB/common.php:1216
8   DB_common->query(' UPDATE civicrm_…')   /var/www/drupal7/sites/all/modules/civicrm/packages/DB/DataObject.php:2421
9   DB_DataObject->_query(' UPDATE civicrm_…')   /var/www/drupal7/sites/all/modules/civicrm/packages/DB/DataObject.php:1613
10   DB_DataObject->query(' UPDATE civicrm_…')   /var/www/drupal7/sites/all/modules/civicrm/CRM/Core/DAO.php:158
11   CRM_Core_DAO->query(' UPDATE civicrm_…', true)   /var/www/drupal7/sites/all/modules/civicrm/CRM/Core/DAO.php:905
12   CRM_Core_DAO::executeQuery(' UPDATE civicrm_…')   /var/www/drupal7/sites/all/modules/civicrm/CRM/Upgrade/Incremental/php/FourFour.php:224
13   CRM_Upgrade_Incremental_php_FourFour::activityContacts(Object(CRM_Queue_TaskContext))   unknown:unknown
14   call_user_func_array(Array, Array)   /var/www/drupal7/sites/all/modules/civicrm/CRM/Queue/Task.php:79
15   CRM_Queue_Task->run(Object(CRM_Queue_TaskContext))   /var/www/drupal7/sites/all/modules/civicrm/CRM/Queue/Runner.php:186
16   CRM_Queue_Runner->runNext(true)   /var/www/drupal7/sites/all/modules/civicrm/CRM/Queue/Page/AJAX.php:44
17   {closure}()   /var/www/drupal7/sites/all/modules/civicrm/CRM/Queue/ErrorPolicy.php:80
18   CRM_Queue_ErrorPolicy->call(Object(Closure))   /var/www/drupal7/sites/all/modules/civicrm/CRM/Queue/Page/AJAX.php:47
19   CRM_Queue_Page_AJAX::runNext(Array)   unknown:unknown
20   call_user_func(Array, Array)   /var/www/drupal7/sites/all/modules/civicrm/CRM/Core/Invoke.php:289
21   CRM_Core_Invoke::runItem(Array)   /var/www/drupal7/sites/all/modules/civicrm/CRM/Core/Invoke.php:72
22   CRM_Core_Invoke::_invoke(Array)   /var/www/drupal7/sites/all/modules/civicrm/CRM/Core/Invoke.php:52
23   CRM_Core_Invoke::invoke(Array)   /var/www/drupal7/sites/all/modules/civicrm/drupal/civicrm.module:456
24   civicrm_invoke('upgrade', 'queue', 'ajax', 'runNext')   unknown:unknown
25   call_user_func_array('civicrm_invoke', Array)   /var/www/drupal7/includes/menu.inc:517
26   menu_execute_active_handler()   /var/www/drupal7/index.php:21
27   {main}   



 

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Upgrade [Error: Consolidate activity contacts] - 4.3.5 to 4.4.3
December 23, 2013, 10:20:21 am
It's hard to say but if you must proceed on the path of salvaging this DB, I think the basic idea is to figure out where in the upgrade process it failed, and then mark your version as being that and run the upgrader again.

However to figure that out may be difficult. I would try to find where in the upgrader code this:

Code: [Select]
UPDATE civicrm_option_value SET is_reserved = 1 WHERE option_group_id
appears. But then I'm not sure how to know where it broke before that... But try that. If you can the upgrader to work, then you can do a rebuild schema procedure. Or if you can figure out what version you have, you can try that also.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

mikem

  • I post occasionally
  • **
  • Posts: 70
  • Karma: 0
  • CiviCRM version: 4.4.3
  • CMS version: 7.X
Re: Upgrade [Error: Consolidate activity contacts] - 4.3.5 to 4.4.3
January 03, 2014, 07:20:31 pm
I am now getting:

Fatal error: Cannot redeclare _PEAR_call_destructors() (previously declared in /usr/local/php53/lib/php/PEAR.php:735) in /home/wvbar/www/www/sites/all/modules/civicrm/packages/PEAR.php on line 811

whenever i try to update. i uploaded the new 4.4 files and now trying to run the script inside of <sitename>/update.php -- not sure if this would help at all? Any other suggestions?

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Upgrade [Error: Consolidate activity contacts] - 4.3.5 to 4.4.3
January 06, 2014, 05:27:13 am
Another possibility to salvage a damaged DB is to either:

1. Find some version of CiviCRM that somewhat works--enough to get a CSV export of your main data
2. Use SQL to export that main data

Then install a fresh empty CiviCRM and import your data. You may lose some non-critical data, but then you would have a clean install.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

mikem

  • I post occasionally
  • **
  • Posts: 70
  • Karma: 0
  • CiviCRM version: 4.4.3
  • CMS version: 7.X
Re: Upgrade [Error: Consolidate activity contacts] - 4.3.5 to 4.4.3
January 08, 2014, 11:56:43 am
I believe i found where it failed. It incrementally updated until it for to 4.4.1Alpha

I have the civicrm_quieue_item table and it looks like i can identify that is where it failed.

O:14:"CRM_Queue_Task":3:{s:8:"callback";a:2:{i:0;s:36:"CRM_Upgrade_Incremental_php_FourFour";i:1;s:16:"activityContacts";}s:9:"arguments";a:0:{}s:5:"title";s:29:"Consolidate activity contacts";}


So now that i know what version it was having issues with would i be able to install the 4.4.1alpha files and run an update? or would it be 4.3.9. - Or am i delusional and i need to start over like suggested?
« Last Edit: January 08, 2014, 12:01:50 pm by mikem »

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Upgrade [Error: Consolidate activity contacts] - 4.3.5 to 4.4.3
January 09, 2014, 04:48:43 am
Quote from: mikem on January 08, 2014, 11:56:43 am
So now that i know what version it was having issues with would i be able to install the 4.4.1alpha files and run an update? or would it be 4.3.9. 

I am uncertain but I would try with a smaller version first, like 4.4.1, yes.

Quote from: mikem on January 08, 2014, 11:56:43 am
Or am i delusional and i need to start over like suggested?

I am also uncertain about that but I am not a mental health professional. ;)
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Upgrade [Error: Consolidate activity contacts] - 4.3.5 to 4.4.3

This forum was archived on 2017-11-26.