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 »
  • Installing CiviCRM »
  • Drupal Installations (Moderator: Piotr Szotkowski) »
  • Upgrading to CiviCRM 3.3.5 when Drupal requires an upgrade as well
Pages: [1]

Author Topic: Upgrading to CiviCRM 3.3.5 when Drupal requires an upgrade as well  (Read 1235 times)

torenware

  • I post frequently
  • ***
  • Posts: 153
  • Karma: 4
Upgrading to CiviCRM 3.3.5 when Drupal requires an upgrade as well
March 03, 2011, 04:16:18 pm
I'm getting into a chicken-and-egg situation with a Drupal 2.2 ==> 3.3.5 upgrade.

The Drupal upgrade cannot proceed while CiviCRM is on, since CiviCRM continually throws errors.  So I need to turn it off.  Can't do this via Drupal's admin /build / module page, so I edit the Drupal system table directly (update system set status = 0 where name = 'civicrm').

Now I can upgrade Drupal without error.  At this point I am But as part of the upgrade process, the menu cache is cleared.

Once this happens, you cannot call the CiviCRM upgrader at civicrm/upgrade?reset=1, since the "civicrm" menu is not yet defined to Drupal.  Normally, a well behaved module in Drupal can be depended upon to send back its menu structure to Drupal when hook_menu is called.  But sadly, CiviCRM is not being well behaved  >:(

This is sort of ridiculous.  Disable CiviCRM if you have to -- you can tell if it's in an uncertain state, after all -- and stop crashing Drupal if someone tries to either (1) log in to Drupal, or (2) tries to run the CiviCRM upgrader.   And make sure that the link to the upgrader actually exists in these corner cases.

My work around will probably involve building the civicrm/upgrade handler in this case.  But it shouldn't require a PHP source debugger like Komodo to install CiviCRM in these cases  ;)

torenware

  • I post frequently
  • ***
  • Posts: 153
  • Karma: 4
Re: Upgrading to CiviCRM 3.3.5 when Drupal requires an upgrade as well
March 04, 2011, 12:25:10 am
A quick note as to how you can work around this problem if you encounter it.

When you're upgrading from quite a few versions back (as I was in this case) and need to upgrade from an earlier version of Drupal 6 _and_ to the current version of CiviCRM, you'll need to do a procedure like this:
  • Backup everything, of course.
  • Deactivate all of your contributed modules except for CiviCRM
  • Make sure you are logged in with a Drupal role that has the privilege "administer CiviCRM"
  • Upgrade CiviCRM using the civicrm/upgrade?reset=1 link.
  • Upgrade Drupal using update.php, as usual.
  • Reactivate the modules you turned off in step (2)
  • Run update.php again to pick up any database changes for your contributed modules.

The reason for this is that upgrading Drupal wipes out your menu definitions, and your non-updated copy of CiviCRM cannot recreate its menus -- the database structure is just too old before you upgrade.  So you need to make sure that your CiviCRM tables are updated _before_ the Drupal updaters clear out the menus, or bad things will happen to you :-)

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Upgrading to CiviCRM 3.3.5 when Drupal requires an upgrade as well
March 04, 2011, 03:21:16 am
I don't follow you. Your order is not what's listed here http://wiki.civicrm.org/confluence/display/CRMDOC21/Upgrade+Drupal+Sites+to+2.1#UpgradeDrupalSitesto2.1-9.RuntheUpgradescript and the instructions there have worked for me many times.

Also you wrote "Drupal 2.2 ==> 3.3.5 upgrade." I think you meant CiviCRM not Drupal, but anyhow, CiviCRM 2.2 already requires Drupal 6, so I don't understand how you could be running that on Drupal 5.
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.

mdlueck

  • Ask me questions
  • ****
  • Posts: 382
  • Karma: 4
  • CiviCRM version: 4.7.24
  • CMS version: Drupal 6.x
  • MySQL version: 5.5.54
  • PHP version: 5.3.10
Re: Upgrading to CiviCRM 3.3.5 when Drupal requires an upgrade as well
March 04, 2011, 04:11:41 am
@torenware: We upgraded from Drupal 5.x and CiviCRM 2.0.x to Drupal 6.x and CiviCRM I believe it was 3.2.x at the time. I carefully read through the CiviCRM upgrade documentation and found I actually needed to make several incremental upgrade stops along the way of upgrading CiviCRM so far.

http://wiki.civicrm.org/confluence/display/CRMDOC21/Upgrade+Drupal+Sites+to+2.1
http://wiki.civicrm.org/confluence/display/CRMDOC22/Upgrade+Drupal+Sites+to+2.2
http://wiki.civicrm.org/confluence/display/CRMDOC32/Upgrade+Drupal+Sites+to+3.2
http://wiki.civicrm.org/confluence/display/CRMDOC33/Upgrade+Drupal+Sites+to+3.3

I recall the first stop was the latest in the CiviCRM 2.1.x series, then latest in 2.2.x series, and finally I was able to jump all the way to the 3.2.x series. Now our CiviCRM installation is all the way current at 3.3.5, which I have pretty much kept up with latest code along the way since arriving at 3.2.x latest.

I always refer back to the upgrade doc for the current series when applying updates, such as from 3.3.3 up to 3.3.5 as example, I again went to the upgrade doc for the 3.3 series.
--
Michael Lueck
Lueck Data Systems
http://www.lueckdatasystems.com/

torenware

  • I post frequently
  • ***
  • Posts: 153
  • Karma: 4
Re: Upgrading to CiviCRM 3.3.5 when Drupal requires an upgrade as well
March 04, 2011, 07:59:12 am
Hershel --

Yeah, I'm pretty aware of the doc.  I'm finishing up a large 1.9 ==> 3.2 upgrade, and I break it up the steps very similar to what you're pointing out.

I am curious why you make a break between 3.2 and 3.3, however, since this isn't in the doc.  Given the trouble I was having with the menu rebuild, however, a stop between 2.2 and 3.3 might well be required.

mdlueck

  • Ask me questions
  • ****
  • Posts: 382
  • Karma: 4
  • CiviCRM version: 4.7.24
  • CMS version: Drupal 6.x
  • MySQL version: 5.5.54
  • PHP version: 5.3.10
Re: Upgrading to CiviCRM 3.3.5 when Drupal requires an upgrade as well
March 04, 2011, 08:19:37 am
Quote from: torenware on March 04, 2011, 07:59:12 am
I am curious why you make a break between 3.2 and 3.3, however, since this isn't in the doc.

I believe you are referring to my post, torenware.

Civi 3.2 had just come out when we were doing the D5 -> D6 migration, so at the time 3.2 was bleeding edge code, which migrating directly to 3.2.1 (I believe that was the version) actually bit us as the upgrade script in that specific version had a bug and trashed the installation!

So I was meaning that from 2.0 those were the stop off points we were required to upgrade via, and since arriving at 3.2.x we have updated to nearly all releases as they have come out.
--
Michael Lueck
Lueck Data Systems
http://www.lueckdatasystems.com/

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • Drupal Installations (Moderator: Piotr Szotkowski) »
  • Upgrading to CiviCRM 3.3.5 when Drupal requires an upgrade as well

This forum was archived on 2017-11-26.