Movable Type breaks permalinks (and they know it)

In the blogosphere (and on the web) permalinks are sacred. Every broken link is like a demerit against your credibility. Even more so with syndication.

So I spent my day trying to figure out why Movable Type 3.2 occasionally appends an “_1” (an underscore followed by the number one) to the end of a published permalink (a basename in MT parlance) when there is no conceivable collision with any other basename, and without creating a duplicate entry.

We thought maybe Ecto was to blame. But I couldn’t recreate the problem with the latest versions on either Windows or Mac.

I talked to a few of our bloggers, and no one could point to a discernible pattern—other than that it only seemed to happen after an edit was made to an already published post. So I tried multiple combinations of setting a post from Published to Unpublished and then back again. But no game.

I reached out to the MT ProNet list and someone suggested that this may be a “known issue” in MT 3.2:

When an entry is saved from the Preview screen, the entry basename may be incremented or, if the title was changed, altered to fit the new title.

Turns out this was spot on. Here’s how to reproduce the bug:

  1. Create a new entry and Save it (the Post Status is irrelevant)
  2. Click the Preview button and click Save this entry
  3. Notice that the Basename now has an “_1” appended to it
  4. Click the Preview button again and click Save this entry
  5. Notice that that the Basename no longer has an “_1” appended to it

I wouldn’t be able to sleep at night if I knew my blogging platform was producing unstable permalinks when users preview their posts and resave them. This is a problem on the scale of “our software is breaking the world wide web.” C’mon Six Apart, can I get a little more gumption than “this is a known issue”? This has been a known issue for five months!

Update: after my rabble-rousing on the ProNet list, Jay Allen posts a patch for fixing the “MT incrementing basename bug”. Thanks Jay!

This post first appeared on From the Belly of the Beasts, a weblog from some of the people who build O’Reilly websites.

Care to Comment?

Or if you'd prefer to get in touch privately, please send me an email.

Name

Email (optional)

Blog (optional)