is niet meer.

De ploeg van is verhuisd naar waar we samen met anderen aan een nieuwswebsite werken. De komende weken en maanden bouwen we om tot een archief van 10 jaar werk van honderden vrijwilligers. upgrades to Drupal 5 and converts from flexinode to cck upgrades to Drupal 5 and converts from flexinode to cck

If you're currently using Flexinode and are worried to be terribly stuck with your Drupal website, fear no more. For now (well, it's been there since January 2007) there is the great Flexiconvert module by starbow. Over at, we used Flexinode for two years and ended up with 8000+ Flexi-nodes. Once Drupal 5 came out, I started to dream about upgrading, and moving to CCK at the same time. Other projects kept me from testing it thoroughly for a long time, but a few weeks ago I got to it: I'm very happy to be able to say that we're now running Drupal 5 and replaced Flexinode with CCK.

Even though the process is well described (upgrade to Drupal 5 here; how to use the Flexiconvert module here), I thought it might be useful to describe step-by-step how I did it. If you have further questions about the procedure we followed, or would have done things differently, please comment. All feedback is welcomed.

For your information: I converted my Flexi-nodes while still on Drupal 4.7, and upgraded to Drupal 5 afterwards. I haven't read any reports of people doing the Flexinode-to-CCK-conversion in Drupal 5, but since there is a 5.x-version of Flexiconvert, I imagine the conversion should work on Drupal 5 as well.

Convert you Flexinode nodes to CCK nodes

Before you begin: go and make a backup of your database (and, why not, your Drupal installation files).

1) Change your Flexinode content types' names into something nice

Since you'll be matching your Flexinode content types with new CCK content types, it's helpful that you have good names for them: it will make management of your content types easier over time. You can always change the names of your CCK content types afterwards, but why not take care of it right away. Tip: note down these names, as you'll need these after you've disabled the Flexinode module(s).

2) Make all Flexinode field labels unique

All Flexinode field labels should be unique. After a few tries, I opted for very simple labels (eg. 'artext' instead of 'Paste your article's text here' for a node body). Make sure the labels are meaningful to you though: you'll need these labels for your new CCK content types' fields as well (see below), so it might be helpful if they still have a meaning to you in a few months.

3) Switch off Flexinode

Navigate to the module management page in your Drupal admin area, and disable the Flexinode module (and, if you have it installed, the Flexinode admin module).

4) Switch on Flexiconvert

If you haven't already, download the Flexiconvert module and put it in your contrib module directory. Navigate to the module management page in your Drupal admin area, and enable the Flexiconvert module.

5) Create your new CCK content types

If you haven't alreay, download the Content Construction Kit and put it in your contrib module directory. Enable it on the module management page.

Navigate to the content types' page and create your new CCK content types. Take care of the following:

- use your old Flexinode content types' names for your new CCK types
- use your old Flexinode content types' field labels for your new CCK types fields' names

Important: do not associate taxonomy vocabularies with your new CCK content types until after the conversion.

6) Convert your Flexi-nodes to CCK nodes

The big moment: navigate to the Flexiconvert page in your Drupal admin area. Select the appropriate Flexinode type to read from and the appropriate CCK type to insert in. Start the conversion by clicking on the button underneath the select boxes. After a while, you should see a confirmation message saying that your nodes have been converted. Yay!

7) Delete flexinode tables in your database

Once you converted your Flexi-nodes to CCK nodes, and you verified that the new CCK nodes work, you can safely delete your flexinode tables from your database. This isn't a must though - if you'd rather keep them for some reason, feel free to do so. I just figure your database is cleaner without them (especially if you have had a lot of Flexi-nodes as we did on our website).

8) Associate taxonomy vocabulary/ies with your new CCK content types

If you had taxonomy vocabularies associated with your old Flexinode types, you can link these vocabularies with your new CCK types now. Navigate to your Categories management page in your Drupal admin area, go to the appropriate vocabulary page, and link your new content types to it (somewhere half way down the page).

Tips/things to watch our for:

  • PHP memory

    When I tried out the conversion (step 6) for the first time, I ran into PHP memory errors (white screens et al). Meaning: PHP was running out of memory and needed more of it. I went into my php.ini file (located in /etc/php4/apache2/php.ini on our Debian server), and increased the memory setting to something higher (100MB) than it was (32MB). If you need to do this, make sure to change it back to its original setting after the conversion is completed.

  • No confirmation message

    When testing the conversion, there where a few times I was waiting and waiting for the Flexiconvert confirmation message, and it just wouldn't come. This is not neccesarily a bad thing: if I waited long enough and clicked the Flexiconvert link (in the admin menu), the confirmation message appeared, and all the nodes were converted correctly. If I didn't wait long enough though, I could go back and start all over again. So, make sure you wait long enough before clicking that link, depending of how many nodes you have of a certain type ...

  • Variable table

    There will be some Flexinode related variables in your Drupal variable database table. You can delete these (and only there) using PHPMyAdmin or a similar tool.

  • Make backups

    To save you (a lot of) time, it is advisable to make backups of your database once in a while when working on this. If something goes wrong during the conversion process (see the two items above), it's nice if you can go one or two steps, instead of having to start all over again.

  • Make backup

    That said, make a backup before you begin this conversion process. Better yet, do the whole thing on a test server if you have one available.

2) Upgrade to Drupal 5

After the Flexinode -> CCK conversion, there was still the Drupal upgrade itself that needed be done. Since this was pretty straight forward, and since it's very well documented here, I won't elaborate on that in this post. A few things though:

  • I had a (rather serious) problem using token.module (required for the pathauto.module that we use on our site) and link.module (providing url fields for CCK content types). After having upgraded to Drupal 5, nodes that used the link.module (or taxonomy term pages showing such nodes) trigerred an Apache segfault. The fix was easy: un-check the box that says 'Allow tokens' in the link field's settings. It was this post that saved my life (thanks Joeri for pointing me to it!).
  • As is mentioned in other upgrade documentation: it is a good idea to clear your cache tables after upgrading.
  • Every time I tested this upgrade, I had to create the views.module's cache database table manually. I simply did a clean install of Drupal 5 and the views.module on my local machine, dumped the views.module's cache table's structure, and insterted it in our live database.

So, I believe that's about it. I hope this post is helpful so some people. Again, feel free to post questions, suggestions, remarks etc.

Good luck & have fun with Drupal 5!

Hi, Thanks for very

Hi, Thanks for very interesting article. I really enjoyed reading all of your articles.

Great article. Well written

Great article. Well written and very useful. Thanks alot!


Gepost door brunodbo