Drupal 6RC2 – A First Try
Well I was being bold today between doing a bunch of other things – one of which was several hours of Wii with my son and Ultimate Alliance – when I decided to throw all caution to the wind and upgrade my Drupal 5.3 instance to 6.0 RC2. I suppose there’s nothing that a good 10 year Scotch can’t make seem easy. Er well – maybe not, but things worked out ok in the end – but I think this is a good case study in how to prepare and then back out of an upgrade.
My Drupal instance at this point is really not a true site. It is a playground where I hack with various modules, try out theming concepts I’m interested in, and play around with how to combine it with other things like my mashup server stuff. Because of this I tend to have a ton of modules, but very little content. This is the nightmare scenario for an upgrade of any of the popular CMS platforms. The more modules that you use, the harder the upgrade is. In any site you should always be very careful to only install the things you really need.
To upgrade you just need to follow the instructions, but for clarity there is one golden rule to upgrading anything: back up everything at least twice. In fact it is a good idea to backup everything to an external drive if you can. Why? Well its not because of “code rot”, but using an external drive really makes you focus on backing up everything. I completed this by simply taking my entire apache directory and my entire mysql directory and copying the whole thing to a connected USB drive. It takes a while, but it is worth it.
Paranoid -> yes. Impossible to F-UP ->yes.
So then I followed the instructions in the download package from Drupal. There is some confusing bits however and these are critical. There is a statement in there about disabling all your non-standard modules. Well – I’m not sure what is and isn’t “standard”. I suppose there is a list somewhere, but I couldn’t find it. I tried to comply and using the admin pages disabled all the stuff I thought I added in.
I tried to go to the update.php script – d’oh. A blank screen. Not good. If this happens go to your apache error.log file and check out what is going on.
I did and I could see a definite problem:
[Sun Jan 27 17:51:24 2008] [error] [client 127.0.0.1] PHP Warning: Unknown column ‘serialized’ in ‘field list’nquery: SELECT data, created, headers, expire, serialized FROM cache WHERE cid = ‘variables’ in C:\Apache\htdocs\drupal-5.3\includes\database.mysql.inc on line 135
[Sun Jan 27 17:51:24 2008] [error] [client 127.0.0.1] PHP Warning: Unknown column ‘serialized’ in ‘field list’nquery: UPDATE cache SET data = ‘a:75:{s:11:\”admin_theme\”;s:10:\”bluemarine\”;s:9:\”anonymous\”;s:9:\”Anonymous\”;s:12:\”comment_page\”;i:0;s:22:\”content_schema_version\”;i:1003;s:9:\”cron_last\”;i:1199133666;s:18:\”drupal_private_key\”;s:64:\”ff4088ebb1908db55ddfbef9066d1616b94f51beb69f28a4dfaa07204e0cded9\”;s:19:\”event_nodeapi_event\”;s:3:\”all\”;s:16:\”event_range_next\”;s:10:\”1194529860\”;s:16:\”event_range_prev\”;s:10:\”1194483060\”;s:26:\”fckeditor_advanced_toolbar\”;s:10:\”DrupalFull\”;s:25:\”fckeditor_default_toolbar\”;s:11:\”DrupalBasic\”;s:17:\”fckeditor_exclude\”;s:0:\”\”;s:24:\”fckeditor_exclude_toggle\”;s:1:\”0\”;s:22:\”fckeditor_minimum_rows\”;s:1:\”5\”;s:15:\”fckeditor_pop in C:\Apache\htdocs\drupal-5.3\includes\database.mysql.inc on line 135
[Sun Jan 27 17:51:24 2008] [error] [client 127.0.0.1] PHP Fatal error: Only variables can be passed by reference in C:\Apache\htdocs\drupal-5.3\modules\cck\content_copy.module on line 175
[Sun Jan 27 17:54:37 2008] [error] [client 127.0.0.1] PHP Warning: Unknown column ‘serialized’ in ‘field list’nquery: SELECT data, created, headers, expire, serialized FROM cache WHERE cid = ‘variables’ in C:\Apache\htdocs\drupal-5.3\includes\database.mysql.inc on line 135
[Sun Jan 27 17:54:37 2008] [error] [client 127.0.0.1] PHP Warning: Unknown column ‘serialized’ in ‘field list’nquery: UPDATE cache SET data = ‘a:75:{s:11:\”admin_theme\”;s:10:\”bluemarine\”;s:9:\”anonymous\”;s:9:\”Anonymous\”;s:12:\”comment_page\”;i:0;s:22:\”content_schema_version\”;i:1003;s:9:\”cron_last\”;i:1199133666;s:18:\”drupal_private_key\”;s:64:\”ff4088ebb1908db55ddfbef9066d1616b94f51beb69f28a4dfaa07204e0cded9\”;s:19:\”event_nodeapi_event\”;s:3:\”all\”;s:16:\”event_range_next\”;s:10:\”1194529860\”;s:16:\”event_range_prev\”;s:10:\”1194483060\”;s:26:\”fckeditor_advanced_toolbar\”;s:10:\”DrupalFull\”;s:25:\”fckeditor_default_toolbar\”;s:11:\”DrupalBasic\”;s:17:\”fckeditor_exclude\”;s:0:\”\”;s:24:\”fckeditor_exclude_toggle\”;s:1:\”0\”;s:22:\”fckeditor_minimum_rows\”;s:1:\”5\”;s:15:\”fckeditor_pop in C:\Apache\htdocs\drupal-5.3\includes\database.mysql.inc on line 135
[Sun Jan 27 17:54:37 2008] [error] [client 127.0.0.1] PHP Fatal error: Only variables can be passed by reference in C:\Apache\htdocs\drupal-5.3\modules\cck\content_copy.module on line 175
Well I’m no rocket scientist, but that looks bad. It looks like there is a problem in the CCK module. I’m not quite sure what that module is or why I have it. I’m sure it was some dependency that I grabbed and installed. I checked the Drupal site and they don’t have a version for 6 yet. I tried to remove itby simply deleting the folder and restarting. No luck. I’m totally dead. This is really not too good. I would think that you should get some kind of error screen from drupal’s upgrader file telling you what is wrong and what to do.
So now I have an issue. I have a complete backup so everything is ok. I decided to try something interesting instead. It was clear my upgrade got stuck partway thru – what would happen if I just put back the 5.3 files? Well that’s exactly what I did and guess what. Drupal started up with no issues, but simply told me to re-run the schema update to get my schema back to the right version. Wow – that’s cool.
Following that I just re-enabled my modules, switched back my themes, and then put my site back on-line. That’s pretty nice. I figured the entire thing would be trashed, but it wasn’t. Nice.
After this little exercise I did do a clean install of the new version and that went like clockwork. the upgrade is a serious issue however so I’ll have to dig in a bit more and figure out what is going on.
I’m going to start working on porting over my troopers theme and I’ll report on that. I’ll also do a bit more research on the issue with CCK and why I have it later. Hopefully later this week I’ll start on a new Drupal 6 theme based on the Saab Turbo-X limited edition that will be hitting the streets in a few weeks.
Drupal upgrades can indeed be very difficult and ypu are totally right about the need for exhaustive backups.
Also, I cannot think of many things cooler than a Turbo-X Drupal theme, (in fact any Saab theme would be of great interest to me). I see that this was posted a year ago, did you get to complete the theme and are you sharing it?
Fred
Ah – no – much to my shame I never did create my Turbo-X theme…if I get a chance I’ll post it and let you know.
Perhaps I got too busy waxing mine 🙂
i experience this issue during upgrade “Fatal error: Only variables can be passed by reference in content_copy.module”. do you have and idea or have you manage to resolved this?
i’m really having some difficulty with this issue… hope you or anyone could help me out…
thanks,
vsotto