As far as we know, updates are not 100% ready for live sites. Updating is made complicated by the migration of conditional actions into core and changes to the module dependencies we're using for product images. We need to know what issues remain to get updates working, and we need to get a patch in that addresses these issues. If you read the release notes, you saw that updates are not recommended on live sites. However, if you can duplicate your live site and start running updates to D6 / UC 2.x, that would be awesome.

We can't have a 2.0 release until there is an upgrade path.

Comments

cha0s’s picture

Assigned: Unassigned » cha0s

Got a snapshot of the livetest going, but I'm having some (non Ubercart-related) problems getting it updated to Drupal 6. Posting updates here!

cha0s’s picture

Alright, I got the livetest upgraded to Drupal 6. The upgrade process was not automatic, there was some fiddling that had to be done in order to make it work. I will outline the steps I had to take to get this working here.

BACK EVERYTHING UP, INCLUDING YOUR WHOLE SITE'S FILES, AND THE DATABASE!
Seriously. I lost count of how many times I had to rollback while I was doing this. If you don't back up you're going to shoot yourself in the foot.

Disable all modules but core:
You might be able to get away with leaving Core - Optional enabled, but I didn't risk it.

Backup your sites/ folder, and your files folder (may vary depending on your configuration):
Make sure that you preserve the permissions of these folders. It will help you later. In Linux to do this you do something
like cp -rp sites/ files/ ../backup/

Delete all your sites files:
Yes, delete all of them. Now you see why I told you to backup before. If you haven't already done that, DO IT BEFORE YOU TAKE THIS STEP!

Install Drupal 6's files where your old site was:
In the same folder you just deleted everything, unpack your shiny new Drupal 6 installation.

Move back sites/ and the files/ directory into the new Drupal 6 installation:
As far as I know, most installations will have sites/default/settings.php for instance, so you shouldn't have to worry too much about that (multi-site configurations could potentially be much harder)
With your files directory though, you're going to want to ensure that wherever you had it configured at before, you put it in the exact same spot. Drupal is going to update and look for it in the same spot, so make sure you do this. It was a source of a lot of headaches for me during this process.

QUIRK: add a language field to the url_alias table:
I don't know what's up with this, but I had to do this to make everything work. Using phpmyadmin (or similar), create a field 'language' (VARCHAR length 2) in the url_alias table. I have not filed a bug against this (or checked if it's already been reported), but it was necessary to upgrade for me. You'll get a (harmless) warning later about how it tried to create the field and it already existed, you can ignore that.

Run update.php:
Navigate to yoursite.com/update.php. If you get an access denied error then you may have to edit your settings.php file. You'll see a variable definition: $update_free_access = FALSE; ...change the FALSE to TRUE, and then you'll be able to update. WARNING: Remember as soon as you're done with the update process, to return this to FALSE, otherwise you will introduce a security hole.
Click 'Continue', then click 'Update'. If this process fails there is a serious problem with your Drupal site. I have never encountered this, so you'd be better off asking in the proper channels.

Delete all old contribs and move new contribs into sites/all/modules:
Again, for most configurations, you'll put your contribs in sites/all/modules. Completely delete everything first though, don't just replace, as this could cause unexpected errors.

Run update.php again:
Yep, same deal... Click 'Continue', then 'Update'. Hopefully everything will update without stopping. (As long as you don't see something like 'unrecoverable error' or similar, you can usually safely ignore the error messages that crop up. Upgrade paths can be complex and 'field already exists'-type errors are harmless usually.)

Alright! So at this point you should (God-willing! :D) have a site up that resembles your old site, but it's in Drupal 6 now... On to a couple of tweaks needed for Ubercart...

Make sure your files/ directory is writeable!
This was another source of drama for me, the error messages relating to this are too cryptic (directory already exists) and it can be very confusing to figure out what's happening.
In Linux you can do something like chmod -R 0777 files/ to make files/ (recursively, meaning all its sub directories as well) world-writeable. I put www-data in the same group as the owner of these files, so I make mine 0775, but you may find that isn't possible with your setup. If you want, try it, and if it doesn't work, make it fully world-writeable (is this a security issue..?)

Go to admin/store to configure Imagecache:
Same as in Drupal 5. If you had previously configured Imagecache in Ubercart 1.x, you'll most likely recieve error here when you try to run the automated Ubercart image setup. That's fine - it appears at this point we have to do a lil more db tweaking to get everything happy.

Set the widget_active field(s) in content_node_field_instance table to 1:
Assuming you already had Imagecache configured in Ubercart 1.x, you'll probably ind that a new field 'widget_active' has been added during the upgrade. Unfortunately, the default is for them to be inactive (0). I went in and changed all the widget_active entries in this table to '1', to activate them. After that, Imagecache worked as it did in the previous version (may take a couple of refreshes before it fully kicks in...)

Great, hopefully at this point you have an Ubercart site that is working in Drupal 6 now! The only thing that might be sketchy as of now are things like custom workflow stuff, unfortunately I don't have enough experience with that to be able to offer any tips. Bug Ryan... ;)
P.S. Remember that if you set $update_free_access = TRUE; in settings.php, to change TRUE back to FALSE. Seriously, or puppies will eat your firstborn goldfish.

cha0s’s picture

StatusFileSize
new3.89 KB

I have attached a patch that will automate the imagecache migration aspect. Once this is in core, there will be no need to do the step of visiting admin/store to do the imagecache configuration again, nor hacking the db to set the widget_active's to TRUE (1).

Island Usurper’s picture

Status: Active » Needs work

Just committed a different update 6004, so this will need a reroll.

cha0s’s picture

StatusFileSize
new3.89 KB

Rerolled.

cha0s’s picture

Status: Needs work » Needs review
Island Usurper’s picture

Status: Needs review » Needs work

The widget_active stuff has to do with the complex updates that CCK does. Basically, CCK requires all of the field modules to be enabled before they all can perform their updates. I think when that happens, widget_active gets set to 1, so those fields become usable again. I did an upgrade and then ran update.php again after enabling filefield and imagefield, and imagecache worked fine without the patch or mucking around in the database.

The only error I got during the upgrade pertaining to Ubercart was the one from the uc_roles_products model index. That code was to fix people who had early versions of the 6.x branch, but not those upgrading from 5.x now. I think that update can go away, since the index name doesn't really matter for those few people still on that old dev version.

There's still no upgrade path from workflow-ng to conditional actions. Well, there kind of is, but it hasn't been tested yet.

I think the long post would make a good handbook page, with a few changes. Make sure to mention how important it is to upgrade to ImageCache 5.x-2.x first, and then start the Drupal upgrade. I've had to start over several times because I kept forgetting that.

Island Usurper’s picture

Version: 6.x-2.0-beta1 » 6.x-2.x-dev
Component: Code » Documentation
Status: Needs work » Active

I've fixed the uc_roles index update, so now we just need to put this into a handbook page and work on converting workflow-ng configurations to CA. I'll make a separate issue for that, and repurpose this one for documentation.

Edit: See #384652: Convert Workflow-ng configurations into CA predicates during upgrade to D6

Island Usurper’s picture

Issue tags: +update

Tagged: update

cha0s’s picture

Got the book page started up at http://www.ubercart.org/docs/general/9410/upgrading_ubercart_drupal_5_dr.... Feel free to suggest any changes here, I may have missed something, but I removed the ImageCache and widget_active stuff, since I think I was just screwing up for that to be necessary.

Should we close this issue now and focus on the workflow-ng configuration issue?

Island Usurper’s picture

Status: Active » Fixed

Yep. That's what we'll do.

Status: Fixed » Closed (fixed)
Issue tags: -update

Automatically closed -- issue fixed for 2 weeks with no activity.