Since I've upgraded townx.org, I also had to upgrade mooch labs and Rails West Midlands. I've finished this now.
By the way, upgrading from Drupal 4 to Drupal 5 wasn't as straightforward as I'd like. The database upgrades worked for my two simple sites, but I rebuilt the database from scratch for this site, as things didn't quite seem to work when I tried to run update.php. Not sure why. So here was my process:
- Set up staging.townx.org (domains, new web space etc.).
- Put an entry in /etc/hosts to point to staging.townx.org (so I don't have to wait for DNS propagation).
- Copied Drupal 5 install to the staging.townx.org directory.
- Copied existing database to townxstaging database.
- Set up connections in sites/staging.townx.org/settings.php to point at townxstaging database.
- Ran update.php on staging.townx.org (NB you have to set $access_check = TRUE in that file for the script to run). A few things didn't work, possibly because I had a non-standard theme, so a lot of my theme settings didn't work and the page went blank. Tip: If you're upgrading an existing site, set the theme to Bluemarine before you start upgrading. But my database structure did get altered properly.
- Created another clean database, townxstaging2, pointed settings.php at that, then ran the Drupal install script to create the database structure. staging.townx.org now contained a blank, default Drupal install.
- Manually installed the modules I need by downloading the versions for Drupal 5 from http://drupal.org. These are the modules I use:
- Textile: there's not a release for Drupal 5, but CVS HEAD version with a patch works fine.
- Pathauto: available for Drupal 5.
- Captcha: available for Drupal 5.
- CommentRSS: available for Drupal 5. I added my own modification to put links onto nodes.
- Manually copied over data from a whole slew of tables from townxstaging to townxstaging2 (note that as I'd updated townxstaging, the tables were in the right format for import; this won't work if you're trying to directly import from a Drupal 4 to a Drupal 5 database):
- blocks: I recreated all the blocks from scratch.
- boxes: Again, I recreated blocks from scratch, cutting and pasting the text for the boxes I need from my old Drupal to my new one (I really should turn them into one or more modules, probably). Text Link Ads only points you at the Drupal module now, which isn't available for Drupal 5 yet. So I copied over my old box code and modified it a bit to fit the Garland theme.
- comments: these imported fine.
- files, file_revisions: These worked fine. I also needed to copy my files directory from my old install into the new one.
- filters, filter_formats: I had to reconfigure all of my input formats. However, as my nodes still referenced the old IDs for the filter formats, I had to manually fix the IDs in the filter_formats table.
- menu: This transferred over fine.
- node, node_comment_statistics, node_revisions: This caused the most hassle, as the ordering of fields in the table has changed between versions. Tip: If you are dumping data out of node_revisions using phpmyadmin, make sure you dump using complete inserts, as this includes the field names in the INSERT statements. Note that you also need to set something in the log field for each record: NULL won't do. So during the export I set the log field to '' for all nodes where the log field wasn't set.
- sequences: I imported these OK. Tip: Make sure any settings in your new database are overwritten by settings from your old database. Otherwise you get weird insert errors, as Drupal will try to reuse IDs that already exist.
- system: In the end, I recreated this from scratch, and didn't use any of my old settings. This meant quite a bit of hassle, but it did give my system settings a much-needed spring clean.
- term_*, vocabulary_*: I just imported all of these.
- url_alias: Imported fine.
- Note that I ignored watchdog, session, cache_* etc. (ephemeral stuff). I also ignored variables, and just recreated that through the GUI. Some things I don't use (like contact, forum), so I ignored them. I ignored history too, which you might not be able to do on a site with multiple users.
- Manually copied my modifications to the page template into the Garland theme. These include some <meta> tags, and some Javascript to run my Blogbeat monitoring.
- Copy my modified .htaccess file (to run under PHP 5 and redirect some domain names onto others).
- Once I had staging.townx.org running properly, I moved my old site out the way, moved staging into its place, renamed a few databases, and hey presto, it seems to be working fine.
There were other bits and pieces I've probably missed, but that about sums it up.
Comments
elliot
Your last update code is the one I'm looking for. Thanks and regards.
Any chance...
...of publishing the modification to the CommentRSS module to get comment feed links into nodes, please?
Hello Jock. To get the RSS
Hello Jock. To get the RSS feed link on individual nodes, I added a function to the end of the modules/commentrss/commentrss.module file (inside the PHP block) which looks like this:
function commentrss_link($type, $node = 0, $main) { $links = array(); if ($type == 'node') { $links['comments_rss'] = array('href' => 'crss/node/'.$node->nid, 'title' => 'comments RSS', 'attributes' => array('title' => t('RSS feed of comments on this post'))); } return $links; }I seem to remember that's all you need to do. NB this works with version 1.12 of the module, but might not work with the latest one (I haven't checked).
Well, I have tried to update
Well, I have tried to update my blogs from Drupal 4 to 6 and I faced some unexpected problems. I decided to lieve my blogs with 4th version...
As you can see, I've stuck
As you can see, I've stuck with an old version. In your position, I'd try to go from 4 to 5, then from 5 to 6. 4 to 6 is bound to cause endless pain.
Thanks...
I'll give that a go and let you know.
Incidentally, I see you're suffering from another problem I've been battling with - that Captcha tells you you have not entered a correct captcha value even as you load a form for the first time. The only way I've found of fixing that so far is to switch to a module called "MyCaptcha" - http://heine.familiedeelstra.com/mycaptcha-download