Is it possible to have a URL that if you reference it in a Movable Type weblog entry, will actually cause Movable Type to crash rather than add the article to your weblog? And if so, how do you get around that problem?
The answer is absolutely yes, there are some URLs that are what my friend Dan would call “death on a stick” for Movable Type. But let me tell you how I know this…
Those of you that follow this Weblog know that I have two other blogs that I also manage, focused on business blogging (The Intuitive Life Business Weblog) and on attachment parenting (AP Parenting.com).
This afternoon, on the business site, I wrote an article about one of my favorite companies, The Teaching Company, which you might be interested in reading (The Teaching Company: Selling by Giving Away). When I was writing that article, I included links to a variety of different pages and data files, as I often do, and was surprised and upset to find that every time I tried to save the entry either as “Publish” or “Draft” status I got a 505 script error from the Web server.
What was most peculiar is that there wasn’t any sort of entry in the Apache log file (error_log) related to the problem, and the MT log file was also devoid of any clues.
After much beating of my head against the wall, and many different edits to the entry, I finally isolated it down to the following line of HTML in the entry:
St. Valentine's Day: A Medieval Origin</a>
I further isolated it down to where I could see that if I included the very last part of that URL, the mp3Valentine.asp, it crashed. If I took it out, everything worked fine.
Stumped? I sure was.
Until I did what all self-respecting technical gurus do: I turned to the true experts and posted a note about the problem to the Movable Type Support Forums. Within an hour I had the answer: it was the trackback auto-discovery feature that was tripping me up!
I’ve already talked about trackbacks (read all about weblog trackbacks to learn more), but this trackback auto-discovery is something else; it’s a capability in Movable Type that causes the program to automatically scan your entry for URLs, then try to ping the trackback utility on each of the servers you’re listing to let the remote sites know about your new article. In the blogging world, it works great and everything cross-links happily.
But for some odd reason, the teach12.com server returns something that Movable Type just couldn’t handle when it sent out a trackback auto-discovery query, and MT just coughed up and lay prone on the floor. Not a good thing.
The solution? Easy as pie once you know it: before posting an article with known dangerous URLs (which you ascertain by having it fail to post properly!), pop over to your MT “Weblog Config” area, then click on Preferences -> Trackback and turn off trackback auto-discovery. Submit your article, wait until the site’s been updated, and then go back to the configuration screen and re-enable autodiscovery.
The only thing I don’t like about this solution is that without lots of fiddling around, you can’t have URLs that should produce trackbacks intermingled with a URL of Death. The real solution is to have MT be a bit more robust…