Importing taxonomy and book data
You've heard about an exciting new module, called the categoryi module, which claims to be a new and improved alternative to the book and taxonomy modules. You've read all the glossy material, and you've decided that it's just the thing you need. You've downloaded the latest version of the module, and the installation went fine. You're pumped and ready to go.
But your site has been online and using Drupal for over 2 years: it started out on Drupal 4.3, and has been using the book and taxonomy modules right from the start. You have over 2,000 taxonomy terms and over 15,000 book pages. And you're really not looking forward to importing them all into category. In fact, the prospect of undertaking this task is so utterly nauseating, you decide to take your mind off it by playing ping-pong with your specially-trained pet rabbit. The rabbit beats you, and you feel yourself sinking lower still into the depths of despair.
Fear not: with the help of the category_legacy module, this task is nowhere near as horrible as it sounds! This tutorial will guide you through the process of importing your taxonomy and book data into the category system, which is, for most users with existing sites, the biggest step in migrating to the category module.
Assumptions
For this tutorial, it is assumed that you have category, category_legacy, category_display, and category_menu installed on your site; and that you have installed both the taxonomy wrapperi and the book wrapper. It is recommended, but not required, that you have the path module enabled.
It is also assumed that you have a reasonable number of taxonomy vocabularies / terms and book pages existing on your site, and that you have experience in using both the taxonomy module and the book module.
Before you start
Before you start reading ahead and actually doing anything, stop now! It is highly recommended that in going through this tutorial, you are using a test site and not a live production site.
Category_legacy is a reasonably stable and reliable module, but nevertheless, data conversion and systems migration are inherently dangerous tasks, and there is always a chance that something will go wrong. There are many variables that this tutorial cannot account for, such as the possibility of a corruption in your existing data (even if small and up until now unnoticed), or the presence of other modules that may interfere with the import process. Do not gamble on these variables being absent: you may very well regret it.
Whether you are using a test site or a live site, it is also highly recommended that you have backed up your entire site and its database before continuing with this tutorial. There is nothing more valuable than your site's content, so don't take any chances with it. Use a tool such as phpMyAdmin to export your database to a text file (preferably in SQL format), which you can then easily restore if need be.
Once you've done all that, and you are confident that you've taken all necessary precautions, you're ready to begin.
Reorganize first
When you import, each top-level item that you import (vocabulary or book) will become a containeri in the new system. I found that it helped to do a bit of reorganizing before I started the import so that all my top level imports were actually things that should be containers. For instance, I had several books that were not top-level items, just collections of pages that I made into books so I could get the back/next behavior. They weren't important enough to become containers (and I didn't want them to start showing up on container lists as important top-level groupings), so I created a book called "Miscellaneous" and made all those odds and ends child pages of that book. Then on import I just got a container called "Miscellaneous" which will probably be useful anyway. I figured all this out after doing it the other way first and ending up with lots of unimportant and meaningless containers :-)