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 from 2.2.6 to 4.1.1
Pages: [1] 2

Author Topic: Upgrade from 2.2.6 to 4.1.1  (Read 3167 times)

devfloppy

  • I’m new here
  • *
  • Posts: 5
  • Karma: 0
Upgrade from 2.2.6 to 4.1.1
March 09, 2012, 12:01:01 pm
I attempted to upgrade from 2.2.6 to 4.1.1 on Drupal 6.22.  I used the instructions from the civicrm wiki.

When I got to step 8, I ran the upgrade script and I got the initial upgrade screen.  I clicked the button to upgrade and got a white screen with this message in my apache log:
PHP Fatal error:  Call to undefined method CRM_Core_BAO_Preferences::value() in /var/www/html/drupal-6.latest/sites/gfn.org.mbea/modules/civicrm/CRM/Upgrade/ThreeZero/ThreeZero.php on line 203

I have performed a similar upgrade in the past without any issue, but it was only upgraded to 3.something and not to 4.  Should I do this in steps?  Anybody know how to solve?

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Upgrade from 2.2.6 to 4.1.1
March 12, 2012, 09:40:27 am
The wiki does say you can upgrade from 2.2.x to 4.1.1 but perhaps your idea is good, as a debugging step. Try a two step upgrade, from 2.2.6 to 3.0 and then 4.1.1. It might help.
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.

devfloppy

  • I’m new here
  • *
  • Posts: 5
  • Karma: 0
Re: Upgrade from 2.2.6 to 4.1.1
March 14, 2012, 08:00:56 am
I was able to update from 2.2.6 to 3.1.6.  I havn't tried yet to go from 3.1.6. to 4. 

CiviTeacher.com

  • I live on this forum
  • *****
  • Posts: 1282
  • Karma: 118
    • CiviTeacher
  • CiviCRM version: 3.4 - 4.5
  • CMS version: Drupal 6&7, Wordpress
  • MySQL version: 5.1 - 5.5
  • PHP version: 5.2 - 5.4
Re: Upgrade from 2.2.6 to 4.1.1
March 28, 2012, 01:18:19 am
I'd bounce from 3.1 to 3.2, then 3.2 to 3.4.

I did what you are doing once, just take it slow.  Backup each time.
Try CiviTeacher: the online video tutorial CiviCRM learning library.

chyatt

  • I’m new here
  • *
  • Posts: 2
  • Karma: 0
Re: Upgrade from 2.2.6 to 4.1.1
April 24, 2012, 11:07:21 am
@devfloppy did you figure this out?  Did you end up upgrading from 3.1 to 3.2, then 3.2 to 3.4?

devfloppy

  • I’m new here
  • *
  • Posts: 5
  • Karma: 0
Re: Upgrade from 2.2.6 to 4.1.1
April 24, 2012, 11:11:14 am
I had to do it in 2 steps.  I upgraded first from 2.2.6 to 3.1 and then later I upgraded to 4.1.1.  I didn't run into any big hurdles doing the upgrade in 2 steps, but when I tried to do it in one it collapsed and I had to revert to a backup.

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Upgrade from 2.2.6 to 4.1.1
April 24, 2012, 11:45:59 am
Quote from: chyatt on April 24, 2012, 11:07:21 am
@devfloppy did you figure this out?  Did you end up upgrading from 3.1 to 3.2, then 3.2 to 3.4?

To upgrade from 3.1 to 3.4, or even from 3.1 to 4.1 should be fine.
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.

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Upgrade from 2.2.6 to 4.1.1
May 05, 2012, 06:03:20 pm
The problem is in the 4.0 - 4.1 upgrade. Even if you are on 4.0 already you can't access any url other than civicrm/upgrade until the upgrade has run. It may be we should push people to get to 4.0 first

Also, for D6 people need to go 'via' 3.4  & THEN change the UF value to 'Drupal6' in civicrm.settings.php
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

bsharp222

  • I’m new here
  • *
  • Posts: 6
  • Karma: 0
  • CiviCRM version: 4.1.3
  • CMS version: WordPress 3.4
  • MySQL version: 5.1.56
  • PHP version: 5.2.17
Re: Upgrade from 2.2.6 to 4.1.1
May 06, 2012, 11:38:22 pm
I need help with a few steps beyond the installation and upgrade process above.  I am getting the same error that devfloppy listed at the start.  The site I am trying to work with runs Drupal 5.x with a 2.2.6 CiviCRM module.  Before starting I made sure to back things up as best as I could in order to make sure I didn't lose the web content or the CiviCRM database.

My hope is to update to Drupal 7 and CiviCRM 4.1.2.  My expectation is that by doing this (and following the support documentation for maintaining the database schema) the CiviCRM database will be made compatible with 4.x.  From there, I hope to supply the database to Wordpress, since I read elsewhere on the forums that the database should be portable between Drupal and Wordpress for CiviCRM 4.x.

I think it would be alright to keep using Drupal if that is the necessary outcome.

The failed attempts I have made so far:
  • Replacing all Drupal 5.x files with 6.x, while preserving the 'sites' folder, visiting install.php, and then replacing the CiviCRM module with 4.1.2, visiting upgrade.php
  • Replacing all Drupal 5.x files with 6.x, while preserving the 'sites' folder, and replacing the CiviCRM module with 4.1.2, visiting either install.php or upgrade.php
  • Replacing all Drupal 5.x files with 6.x, while preserving the 'sites' folder, visiting install.php, then replacing 6.x with 7.x, while preserving the 'sites' folder, visiting install.php again (I have not tried to replace the CiviCRM module yet for this)

I didn't get the same errors each time.  One of them has to the with the images module being upgraded while installing Drupal 6.  Regardless of the error, I have been restarting from my backups every time, since I need to keep the database useable.  I read elsewhere that installation/upgrade errors can damage the database.  I can build the site all over, but the database is too critical to let go of right now.  I don't know enough about working with databases in order to get it to work with Wordpress, otherwise I would just do that.

At this point, I am at a loss for what to do.  I believe I have accurately listed my failed attempts, but I am willing to try all the installation/upgrade combinations again.  If the consensus is to upgrade CiviCRM to 3.1 before 4.x, then my question turns to:
Do I replace the Drupal and CiviCRM module files all at once, or do I do one before the other?
Which step do I take next - Installing Drupal 6, or Upgrading to CiviCRM 3.1?


Edit:
As a mention, I have always changed the civicrm.settings.php file appropriately for the installation of Drupal being used with CiviCRM.

Also, I forgot to ask if I need to remove the old CiviCRM module files before extracting the new ones.
« Last Edit: May 06, 2012, 11:47:47 pm by bsharp222 »

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Upgrade from 2.2.6 to 4.1.1
May 07, 2012, 05:15:55 am
I don't think you can upgrade directly from CiviCRM 2.2.6 to 4.1. The wiki does say that you can, but it doesn't seem doable in actuality.

What I would recommend is that you do the upgrade in smaller increments, as noted above in this thread.

For each one, follow the steps in the wiki. Start with: http://wiki.civicrm.org/confluence/display/CRMDOC30/Upgrade+Drupal+Sites+to+3.0 and proceed step by step.

You will need to upgrade it in Drupal and it won't work in WordPress until it's CiviCRM 4.1. You should upgrade Drupal to 6 first and then do CiviCRM. When you upgrade CiviCRM, you don't have to remove the old files before installing new ones, but I recommend doing so.
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.

bsharp222

  • I’m new here
  • *
  • Posts: 6
  • Karma: 0
  • CiviCRM version: 4.1.3
  • CMS version: WordPress 3.4
  • MySQL version: 5.1.56
  • PHP version: 5.2.17
Re: Upgrade from 2.2.6 to 4.1.1
May 07, 2012, 10:07:44 am
Thank you Hershel!  I appreciate the help.  I will write back if I get any other errors that I can't explain.

Cheers!

mathieu

  • Administrator
  • Ask me questions
  • *****
  • Posts: 620
  • Karma: 36
    • Work
  • CiviCRM version: 4.7
  • CMS version: Drupal
  • MySQL version: MariaDB 10
  • PHP version: 7
Re: Upgrade from 2.2.6 to 4.1.1
May 08, 2012, 02:41:12 pm
As Eileen said:  you need to upgrade 2.2 -> 4.0 first, then 4.0 -> 4.1.
The CRM_Core_BAO_Preferences::value() function was renamed in 4.1, and the upgrade procedure at 3.x still calls that. Make sure you also do the UF change as described in her post.
CiviCamp Montréal, 29 septembre 2017 | Co-founder / consultant / turn-key CiviCRM hosting for Quebec/Canada @ SymbioTIC.coop

totten

  • Administrator
  • Ask me questions
  • *****
  • Posts: 695
  • Karma: 64
Re: Upgrade from 2.2.6 to 4.1.1
May 08, 2012, 06:24:36 pm
As part of my testing on CRM-10007, I tried doing a 2.2.8 = > 4.2 (trunk) upgrade and ran into the same issue. I patched the obvious/fatal errors in trunk (r40252, r40259, r40262), and the standard web-based upgrade appears to complete without errors.

Here are some cases that I tested:

CMSFromToMediumOutcome
D62.2.8 (tar)4.2.x (trunk+branches/v3.4)Web (civicrm/upgrade)Completes without any obvious errors
D62.2.8 (tar)4.2.x (trunk+branches/v3.4)Drush"civicrm-upgrade-db" runs w/o obvious errors, but "civicrm-update-cfg" fails
D74.0.x (branches/v4.0)4.2.x (trunk)Web (civicrm/upgrade)Completes without any obvious errors
D74.0.x (branches/v4.0)4.2.x (trunk)DrushCompletes without any obvious errors

I don't currently have plans to test upgrades from 2.2 diligently, but maybe this is a helpful starting point for someone with a keener interest.

bsharp222

  • I’m new here
  • *
  • Posts: 6
  • Karma: 0
  • CiviCRM version: 4.1.3
  • CMS version: WordPress 3.4
  • MySQL version: 5.1.56
  • PHP version: 5.2.17
Re: Upgrade from 2.2.6 to 4.1.1
May 08, 2012, 10:44:39 pm
@totten, what I think I hear you saying is that we can now go from 2.2 to 4.1, is that correct?

I messed up the Drupal database by upgrading to D7.  I have gotten back to a clean slate, so I want to meticulously make sure I do things right.  :)

Thanks for your work!

totten

  • Administrator
  • Ask me questions
  • *****
  • Posts: 695
  • Karma: 64
Re: Upgrade from 2.2.6 to 4.1.1
May 08, 2012, 11:53:12 pm
Unfortunately, no, and I probably should have used less developer-speak.

The most recent release, 4.1.2, hasn't changed -- it still suffers from the issues which prevent a direct upgrade, and your best bet is to proceed with the intermediate upgrade (as other folks advised).

When the next release, 4.2.alpha1, comes out, it will include some fixes for direct 2.2=>4.2 upgrades. The next release is at least a few weeks away, so it may be too late to help with your current project. But I wanted the folks here to know that some action was taken to fix this issue.

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

This forum was archived on 2017-11-26.