Upgrading Drupal to Version 5.1

The answer you entered to the math problem is incorrect.

Probably for over a year I've been using Drupal as a publishing platform for my blog and Japanese course notes. It is a quite simple, yet powerful Content Management System which maintenance does not require much attention. I have to check the log on regular basis and apply the patches (which usually fix some security problems or sometimes add new functionality). In addition to that I have to try to have the latest versions of the modules. And this task is rather troublesome, as there is no common interface (or at least I haven't found such) for package management which would simply show which packages need to be upgraded. There was also no simple way to determine the dependencies between the modules (which module depends on which, which conflicts with which, etc). To determine such subtle features of the modules it was necessary to dig in the INSTALL.txt files or try to experiment and determine the dependencies by analysing the error logs.

All the upgrades so far were rather minor as they were all related to one major version of Drupal (4.xx). But quite recently a new version of Drupal (5.1) had been released. The major version number had changed, which meant that really big changes were made and backward compatibility in some cases was broken. The changes most probably included: internal structures, API, database structures, module architecture. That is why I had to perform this upgrade with caution. I decided to make a local copy of my Drupal site and to execute the upgrade on the local machine and after double checking that everything is working fine to copy everything back to the server.

First I had to perform the backup of the database (I use MySQL, so I used MySQLAdmin). I do it on regular basis, but this time I wanted to have the most recent snapshot of the Drupal. In addition to that I had to backup all the files from the server - in order to restore them at the local computer. Then I followed the steps contained in the Drupal 5.1 package:

  • Turn off all the non-core modules.
  • Backup all the important customised files (sites configuration, various CSS and themes modifications, etc)
  • Delete the old installation of Drupal.
  • Copy the files of new Drupal.
  • Restore the important customised files.
  • Install the newest versions of the modules (unfortunately not all modules are compatible with the newest Drupal version).

After all these steps there was just one more thing to do. I had to invoke the update.php script which performs the update of the database structure. The script worked perfectly well and reported a lot successful queries and no failures. But when I tried to access any of the Drupal pages I kept receiving the "Page not found" message (generated by Drupal). I tried to find the solution on various Drupal community sites and forums, but I failed (there were some hints and pointers, but they didn't work). Thus I decided to manually connect to the database and remove data from some tables (I chose the tables for truncating by their name). I had truncated following tables: cache_page, cache, sessions, cache_menu. And this solved the mystery of "Page not found" error.

At one point of the upgrade procedure I had a problem with incompatibility of the blog taxonomy block. Script was causing an error - trying to call a non-existent function (which was quite likely to happen as the API had changed). I had to manually remove the block information from the database, because due to the errors I couldn't access the administration panel.

I have also decided to install two modules that allow to post the different language versions of the nodes. The modules are called Internationalisation and Translation. I will try to post a dual language post from time to time. But I usually have some notes that I prefer to post in English and some in Polish, so we shall see...

Post new comment

Please solve the math problem above and type in the result. e.g. for 1+1, type 2.
The content of this field is kept private and will not be shown publicly.