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 4.2.7 to 4.3.2 fails on 4.3.alpha1 due error on rename file
Pages: 1 2 [3]

Author Topic: upgrade 4.2.7 to 4.3.2 fails on 4.3.alpha1 due error on rename file  (Read 4765 times)

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: upgrade 4.2.7 to 4.3.2 fails on 4.3.alpha1 due error on rename file
May 12, 2013, 02:52:51 pm
The error message above implies that contact id 1 does not exist so it can't build the dashboard. If may be that logging out & back in again will help since you probably changed the civicrm database without the session 'being told'

The columns ending in _FR are French language columns and yes, you either need to make sure they are not included in your backup, or add them to the DB you are importing into. It might be that using the FR version of the DB setup works (ie. you will have used civicrm.sql to create your blank database but there should be language specific versions in the same folder - or in the l10n tarball from the civi download site
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

davej

  • Ask me questions
  • ****
  • Posts: 404
  • Karma: 21
Re: upgrade 4.2.7 to 4.3.2 fails on 4.3.alpha1 due error on rename file
May 30, 2013, 04:06:33 am
Hi,

We had a similar error here going 4.3.alpha . It wasn't to do with contact id 1or the logged-in user, it was an orphan record in civicrm_dashboard_contact, found with this query:

Code: [Select]
mysql> select dc.* from civicrm_dashboard_contact dc left outer join civicrm_contact c on dc.contact_id = c.id where c.id is null;
Deleting the orphan record in civicrm_dashboard_contact solved the problem.

Cheers,

Dave J

majovdh

  • I post occasionally
  • **
  • Posts: 58
  • Karma: 2
    • Chautaara VZW
  • CiviCRM version: 4.2.6
  • CMS version: drupal 7.17
  • MySQL version: 5.1.56
  • PHP version: 5.2.17
Re: upgrade 4.2.7 to 4.3.2 fails on 4.3.alpha1 due error on rename file
June 11, 2013, 02:59:25 am
Dave J,

Do you mean i have to remove the last line in the dbase (picture attached)?

Majo

davej

  • Ask me questions
  • ****
  • Posts: 404
  • Karma: 21
Re: upgrade 4.2.7 to 4.3.2 fails on 4.3.alpha1 due error on rename file
June 11, 2013, 04:59:18 am
Hi Majo,

It looks as though you have civicrm_dashboard_contact records for two non-existent contact_ids: ten for contact_id 781 and one for contact_id 1336. So I think those eleven civicrm_dashboard_contact records need to be deleted. I suggest:

- Double-check that you really don't have contacts with id 781 and 1336.
- Back up your database.
- Delete the 11 civicrm_dashboard_contact records shown in your screen shot.

Usual disclaimers apply: I'm not aware of any dangers from doing this but obviously I can't take responsibility for anything bad that might happen as a result! Please study the database structure yourself and make sure you're happy with the action before doing it.

Hope this helps,

Dave J

majovdh

  • I post occasionally
  • **
  • Posts: 58
  • Karma: 2
    • Chautaara VZW
  • CiviCRM version: 4.2.6
  • CMS version: drupal 7.17
  • MySQL version: 5.1.56
  • PHP version: 5.2.17
Re: upgrade 4.2.7 to 4.3.2 fails on 4.3.alpha1 due error on rename file
June 11, 2013, 08:19:08 am
removed the contact dashboard and same problem is occuring

Code: [Select]
CiviCRM Upgrade Tasks
[Error: Upgrade DB to 4.3.alpha1]
Error Field Error Value
Type DB_Error
Code -1
Message DB Error: unknown error
Mode 16
UserInfo ALTER TABLE civicrm_membership_type DROP FOREIGN KEY FK_civicrm_membership_autorenewal_msg_id [nativecode=1025 ** Error on rename of './chautaar_chautaardr7_crm/civicrm_membership_type' to './chautaar_chautaardr7_crm/#sql2-200d-7107aa' (errno: 152)]
DebugInfo ALTER TABLE civicrm_membership_type DROP FOREIGN KEY FK_civicrm_membership_autorenewal_msg_id [nativecode=1025 ** Error on rename of './chautaar_chautaardr7_crm/civicrm_membership_type' to './chautaar_chautaardr7_crm/#sql2-200d-7107aa' (errno: 152)]
PEAR_Exception: DB Error: unknown error in unknown on line unknown
- DB_Error: DB Error: unknown 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)) /home/chautaar/public_html/sites/all/modules/civicrm/packages/PEAR.php:931
2 PEAR_Error->PEAR_Error('DB Error: unknow…', -1, 16, Array, 'ALTER TABLE civi…') /home/chautaar/public_html/sites/all/modules/civicrm/packages/DB.php:969
3 DB_Error->DB_Error(-1, 16, Array, 'ALTER TABLE civi…') /home/chautaar/public_html/sites/all/modules/civicrm/packages/PEAR.php:564
4 PEAR->raiseError(null, -1, null, null, 'ALTER TABLE civi…', 'DB_Error', true) /home/chautaar/public_html/sites/all/modules/civicrm/packages/DB/common.php:1905
5 DB_common->raiseError(-1, null, null, null, '1025 ** Error on…') /home/chautaar/public_html/sites/all/modules/civicrm/packages/DB/mysql.php:898
6 DB_mysql->mysqlRaiseError() /home/chautaar/public_html/sites/all/modules/civicrm/packages/DB/mysql.php:327
7 DB_mysql->simpleQuery('ALTER TABLE civi…') /home/chautaar/public_html/sites/all/modules/civicrm/packages/DB/common.php:1216
8 DB_common->query('ALTER TABLE civi…') /home/chautaar/public_html/sites/all/modules/civicrm/packages/DB/DataObject.php:2421
9 DB_DataObject->_query('ALTER TABLE civi…') /home/chautaar/public_html/sites/all/modules/civicrm/packages/DB/DataObject.php:1613
10 DB_DataObject->query('ALTER TABLE civi…') /home/chautaar/public_html/sites/all/modules/civicrm/CRM/Core/DAO.php:155
11 CRM_Core_DAO->query('ALTER TABLE civi…', false) /home/chautaar/public_html/sites/all/modules/civicrm/CRM/Core/DAO.php:917
12 CRM_Core_DAO::executeQuery('ALTER TABLE civi…', Array, true, null, false, false) /home/chautaar/public_html/sites/all/modules/civicrm/CRM/Upgrade/Incremental/php/FourThree.php:786
13 CRM_Upgrade_Incremental_php_FourThree->task_4_3_alpha1_checkDBConstraints() /home/chautaar/public_html/sites/all/modules/civicrm/CRM/Upgrade/Incremental/php/FourThree.php:196
14 CRM_Upgrade_Incremental_php_FourThree->upgrade_4_3_alpha1('4.3.alpha1') /home/chautaar/public_html/sites/all/modules/civicrm/CRM/Upgrade/Form.php:570
15 CRM_Upgrade_Form::doIncrementalUpgradeStep(Object(CRM_Queue_TaskContext), '4.3.alpha1', '4.2.9', '4.3.4', '/tmp/civicrm-pos…') unknown:unknown
16 call_user_func_array(Array, Array) /home/chautaar/public_html/sites/all/modules/civicrm/CRM/Queue/Task.php:79
17 CRM_Queue_Task->run(Object(CRM_Queue_TaskContext)) /home/chautaar/public_html/sites/all/modules/civicrm/CRM/Queue/Runner.php:186
18 CRM_Queue_Runner->runNext(true) /home/chautaar/public_html/sites/all/modules/civicrm/CRM/Queue/Page/AJAX.php:44
19 {closure}() /home/chautaar/public_html/sites/all/modules/civicrm/CRM/Queue/ErrorPolicy.php:80
20 CRM_Queue_ErrorPolicy->call(Object(Closure)) /home/chautaar/public_html/sites/all/modules/civicrm/CRM/Queue/Page/AJAX.php:47
21 CRM_Queue_Page_AJAX::runNext(Array) unknown:unknown
22 call_user_func(Array, Array) /home/chautaar/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php:258
23 CRM_Core_Invoke::runItem(Array) /home/chautaar/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php:70
24 CRM_Core_Invoke::_invoke(Array) /home/chautaar/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php:52
25 CRM_Core_Invoke::invoke(Array) /home/chautaar/public_html/sites/all/modules/civicrm/drupal/civicrm.module:436
26 civicrm_invoke('upgrade', 'queue', 'ajax', 'runNext') unknown:unknown
27 call_user_func_array('civicrm_invoke', Array) /home/chautaar/public_html/includes/menu.inc:517
28 menu_execute_active_handler() /home/chautaar/public_html/index.php:21

davej

  • Ask me questions
  • ****
  • Posts: 404
  • Karma: 21
Re: upgrade 4.2.7 to 4.3.2 fails on 4.3.alpha1 due error on rename file
June 19, 2013, 03:48:06 am
Hi Majo,

The suggestion involving civicrm_dashboard_contact records was for the error you reported in this post:
http://forum.civicrm.org/index.php/topic,28625.msg122974.html#msg122974
- which is the error you said you had on the 4.2.9 upgrade.
So it looks as though you've got past that and are now getting the error that you originally reported. I haven't encountered that error myself.

Dave

Pages: 1 2 [3]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • upgrade 4.2.7 to 4.3.2 fails on 4.3.alpha1 due error on rename file

This forum was archived on 2017-11-26.