Upgrading from Drupal 5 to 7 and the XML Sitemap Module

  • Posted on: 17 December 2013
  • By: shivanj

After months of deliberation and procrastination, I have finally found the time to upgrade my own website. It's now running on Drupal 7.

I decided to change the theme and keep it simple. A neat layout and also mobile friendly theme is what I was aiming for. Thanks to the many contributors at Drupal, finding a user contributed simple and clean theme was not very hard at all.

The hardest part of this upgrade was the XML Sitemap module. Because I went straight from Drupal 5 to Drupal 7, there were some extra steps I had to take to get this module to work. The upgrade path for this module was not a straight forward one however.

I must say that I did follow the module's instructions for this upgrade in which they said "If you're upgrading from version 5 to version 7, please use the 5.x-1.7 to 6.x-1.x to 6.x-2.x to 7.x-2.0-rc1 path." This led to me having the latest stable module, but every time I go to the config page for the module I was given a notice error.

Even trying to uninstall the module was somewhat impossible. So I was basically stuck with an installed XML sitemap module that I could not uninstall nor use. This seems to be a pretty common problem with this module.

The Solution

Before you do anything of this nature, it goes without saying that you should BACKUP YOUR DATABASE.

I resorted to manually deleting the module's tables and variables from the database.

To do this I used PHPMyAdmin and deleted all tables that started with xmlsitemap. I also did the same for each row in the variables table for all variables LIKE %xmlsitemap%. A little dirty hack ain't it?

After doing this, I was then able to uninstall the module within the admin interface. Now, finally I could install the module as a fresh install.

I know this is not ideal but fortunately, this module does not store a lot of information so I could have afforded to loose that for a fresh install.

I hope this post will save someone else from chasing shadows in debugging this problem.