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) »
  • Upgrading from 3.0.4 to 3.1.2
Pages: [1]

Author Topic: Upgrading from 3.0.4 to 3.1.2  (Read 1585 times)

goran

  • I post occasionally
  • **
  • Posts: 85
  • Karma: 3
Upgrading from 3.0.4 to 3.1.2
February 23, 2010, 01:36:19 pm
Here I am again.
I thought my upgrade to 3.0.4 was salvaged, but it seems it is not so.
Going for upgrade to 3.1.2 reports:

Sorry. A non-recoverable error has occurred.

Database check failed - it looks like you have already upgraded to the latest version (v3.1.2) of the database. OR If you think this message is wrong, it is very likely that this a partially upgraded db and you will need to reload the correct db on which upgrade was never tried.

However, the upgrade to 3.1.2 (or 3.1.1) was never attempted on this database.
I have also checked value of version column in civicrm_domain prior to upgrade (on a 2nd attempt) and it shows 3.0.4.

So, I am quite puzzled on how to proceed here. Any suggestions?

Deepak Srivastava

  • Moderator
  • Ask me questions
  • *****
  • Posts: 677
  • Karma: 65
Re: Upgrading from 3.0.4 to 3.1.2
February 23, 2010, 11:42:15 pm
Doesn't look surprising given that you been playing with the db - http://forum.civicrm.org/index.php/topic,12167.0.html.

Since you look ninja enough, you can figure out the problem by looking at the code for the checks that's failing and throwing that error.

Or if you have cleanup backup try loading that and check.
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

goran

  • I post occasionally
  • **
  • Posts: 85
  • Karma: 3
Re: Upgrading from 3.0.4 to 3.1.2
February 24, 2010, 02:25:31 am
Deepak, thank you for the reply. Unfortunately I don't have a clean backup (or more precisely clean backups are very old).
I'll try debugging the upgrade and getting to the bottom of it. Btw, just out of curiosity what would you recommend for interactive debugging? (I've only ever tried PHPEclipse/Xdebug).

Also, another recommendation/opinion/suggestion question - would the clean install of 3.1.2 and reload of data from previous version be an easier task then trying to fix things that bother the update script? And also maybe better in the long run? My data is mostly contacts/mailings/addresses - would I run into primary/foreign key rewriting even if I empty sample data?

P.S. I know none of the above have a clear-cut answer without inspecting the data in much greater detail. Just looking for some suggestions/pointers and don't want to waste much of anyone's time for the issue which does not really apply to many people.

Deepak Srivastava

  • Moderator
  • Ask me questions
  • *****
  • Posts: 677
  • Karma: 65
Re: Upgrading from 3.0.4 to 3.1.2
February 24, 2010, 03:02:09 am
Quote
Also, another recommendation/opinion/suggestion question - would the clean install of 3.1.2 and reload of data from previous version be an easier task then trying to fix things that bother the update script? And also maybe better in the long run? My data is mostly contacts/mailings/addresses - would I run into primary/foreign key rewriting even if I empty sample data?

Reloading of data from 3.0.4 to the structure of 3.1.2, might not work since some columns be missing / new ..etc. Or if you mean replacing fresh install's 3.1.2 db /w 3.0.4 db, would not be of help as this 'll result in same error.
However you could try rebuilding the schema for 3.0.4 and then go for upgrade.

Quote
I'll try debugging the upgrade and getting to the bottom of it. Btw, just out of curiosity what would you recommend for interactive debugging? (I've only ever tried PHPEclipse/Xdebug).

Whichever you are comfortable with. I have Xdebug installed but never tried eclipse.
If you go this path - a simple grep of the message should point you to the file. Also all upgrade code is in CRM/Upgrade/* dir.
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

goran

  • I post occasionally
  • **
  • Posts: 85
  • Karma: 3
Re: Upgrading from 3.0.4 to 3.1.2
February 24, 2010, 04:20:45 am
Quote
Or if you mean replacing fresh install's 3.1.2 db /w 3.0.4 db, would not be of help as this 'll result in same error.
However you could try rebuilding the schema for 3.0.4 and then go for upgrade.
Well, I did that. I did a diff of schema-only dumps for clean 3.0.4 and my 3.0.4. The only difference was the order of columns and a few renames for the constraints. (well the only difference after I fixed a few things, that's why I was puzzled re civicrm thinking that the version is...)

Anyway, thanks for the help, I'll try to debug it and if anything interesting comes out I'll report... best


goran

  • I post occasionally
  • **
  • Posts: 85
  • Karma: 3
Re: Upgrading from 3.0.4 to 3.1.2
February 26, 2010, 10:51:12 am
update:

I managed to bring my installation to 3.1.3. A big thank you to all who helped.

In short this is what worked for me:
- did a clean install of 3.0.4 (the last version of my data, but not completely right... had an extra field 'names' in civicrm_loc_block)
- rebuild the data (mostly by restoring mysqldumps created with -c --insert-ignore -t for existing tables, and dumping full data for custom tables and import tables that didn't exist in the clean 3.0.4 install)
- did an official upgrade from 3.0.4 to 3.1.3 with no error messages

I knew that I would run into some problems with existing data that comes with a clean install that blocked the import of my own data (default domains and other settings, some weirdness with custom fields). I fixed those and moved on to testing.

And just went i thought I was home free (finished testing mailings from civimail, searching, groups) I realized that I can not save any changes to contacts (only contacts).

I get no error messages. I tried truncating all the caches in the db, deleted /drupal/sites/default/files/civicrm/templates_c/*.  
It allows me to go into edit, enter and change data, and when I press save and the screen refreshes and my changes are still visible (while I am still at civicrm/contact/add?reset=1&action=update&cid=). But no changes are saved. I reviewed the drupal settings and I have drupal permission to edit all contacts.

Any suggestions on where to start looking (or what and where to debug)?




« Last Edit: February 26, 2010, 10:57:03 am by goran »

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: Upgrading from 3.0.4 to 3.1.2
February 26, 2010, 11:42:36 am

i'd do the following:

1. do a civicrm menu rebuild

2. check mysql query log and see the DB queries generated

3. check apache access log and see what POST / GET requests are issued

4. get on IRC, if we can get ssh access

http://wiki.civicrm.org/confluence/display/CRMDOC/SSH+Access+Requirements

we can take a quick look at it

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

goran

  • I post occasionally
  • **
  • Posts: 85
  • Karma: 3
Re: Upgrading from 3.0.4 to 3.1.2
March 01, 2010, 05:22:50 am
[update - solved]
Thanks for the offer on ssh, I appreciate it - I'll give it another try since I managed to finally setup xdebug.

So xdebug helped me establish that I am missing email_greeting from civicrm_option_group and civicrm_option_value.
(I think I deleted that - there was some custom data that got mixed up with civicrm data).
Will try to restore that and see if that's it [update - that was it]. Funny thing (bug?) is that the error message, which gets composed in the form's validate, is not rendered on the screen.

In the mean time, while hunting for the data to restore I saw what seems to be a little typo in sql/civicrm_data.mysql, here's a diff
Code: [Select]
4803c4803
<   (@option_group_id_emailGreeting, 'Dear {contact.household_name}',                                             5, 'Dear {contact.househols_name}',                                             NULL,    2, 1, 5, NULL, 0, 0, 1, NULL, NULL),
---
>   (@option_group_id_emailGreeting, 'Dear {contact.household_name}',                                             5, 'Dear {contact.household_name}',                                             NULL,    2, 1, 5, NULL, 0, 0, 1, NULL, NULL),
4809c4809
<   (@option_group_id_postalGreeting, 'Dear {contact.household_name}',                                             5, 'Dear {contact.househols_name}',                                             NULL,    2, 1, 5, NULL, 0, 0, 1, NULL, NULL),
---
>   (@option_group_id_postalGreeting, 'Dear {contact.household_name}',                                             5, 'Dear {contact.household_name}',                                             NULL,    2, 1, 5, NULL, 0, 0, 1, NULL, NULL),
« Last Edit: March 01, 2010, 05:28:40 am by goran »

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Upgrading from 3.0.4 to 3.1.2

This forum was archived on 2017-11-26.