Upgraded to Movable Type 4.21

It’s been almost five years since Movable Type 2.65 was released . Currently the latest version of Movable Type is 4.21. Yet version 2.65 is what I’ve been using to run this site up until a week or so ago.

I delayed upgrading partly because I did not feel like dealing with the unavoidable upgrade breakage, partly because MT 2.65 actually has been working pretty well for me - it does the job it’s supposed to do.

Nevertheless I did not want to feel like an IE 6 holdout anymore. It was time to clean up the cruft that’s been building up in my Movable Type installation over the years, take the plunge, and upgrade to Movable Type 4.21. And – you guessed it – I did run into some issues.

Minor problems with (mostly) easy fixes

To make a long story short there were some upgrading problems involving obsolete plugins, plugins that needed upgrading, and template adjustments. The problems I ran into were actually both fewer and less severe than I had feared, but I am happy that I got Movable Type set up locally on my Mac to test and fix everything before touching the live site.

As far as I am aware nothing related to Movable Type is broken around here (though if you come across anything broken, please let me know).

Use dirify? Beware of possible URL changes.

One tip that I’d like to give anyone else considering upgrading from a really old version of Movable Type is to keep an eye on how your entry URLs are created. I used to create each post’s URL by using the dirify function: <$mt:EntryTitle dirify="1"$>. In more recent versions you’re supposed to use <$mt:EntryBasename$> instead since there is no guarantee that the dirify function will always work the same (there wasn’t much choice in 2.65 since the basename functionality was introduced in MT 3, if I am correct).

Well, it turned out that the latest version of MT changed one detail of the dirify function - it no longer removes hyphens from the input text. This meant that any post that had a hyphen in the title got a new URL after the upgrade. Ouch!

At first I thought I would be spending hours creating rewrite rules to avoid breaking incoming links, but luckily there is an easy way to fix this problem by way of the EntrySetBasename plugin.

The plugin contains a function that goes through all entries and sets their basenames to match the output from the old dirify function. I had to tweak the template code used with the plugin a bit to make it recreate the basenames for all of my old entries, not only those with hyphens in. When my ancient MT database was converted to the new format all entries got basenames, but they were limited to 30 characters which unfortunately is not enough for many of my posts. If you need to do the same, replace these lines:

  1. <mt:if name="new_dirified_title" ne="$old_dirified_title">
  2. <li>
  3. <$mt:EntrySetBasename value="$old_dirified_title" test="1"$>
  4. </li>
  5. </mt:if>

with this:

  1. <li>
  2. <$mt:EntrySetBasename value="$old_dirified_title" test="1"$>
  3. </li>

Anyway, the URLs should be fine now.

New admin interface

For someone coming straight from Movable Type 2.65 to 4.21, the difference to the admin interface is huge. Visually it is not even close to being the same CMS. In other words it takes a little while to get used to, but it’s worth it.

Still liking Movable Type

Many people who used Movable Type back in the day have moved to other platforms. I have also spent plenty of time looking at other options (Wordpress, Textpattern, and Expression Engine to name a few), but I keep coming back to MT. One reason is that I know how to get absolute control of the markup and URLs it outputs, another that I really like how it creates static HTML (or PHP, or whatever you like) files of everything.

If you’re looking for a blogging CMS, either because you’re just starting out or because you’re not entirely happy with what you are currently using, do give Movable Type a chance. You just might like it.

Posted on October 20, 2008 in Movable Type, Site news

Comments are disabled for this post (read why), but if you have spotted an error or have additional info that you think should be in this post, feel free to contact me.