Today I was cleaning up some of the trackback code for WordPress when a number of things struck me about Trackback, which I’m sure someone has thought of before but I’m surprised they haven’t been addressed in the specification.
First off, what is trackback? On movabletype.org there is a Beginner’s Guide to TrackBack that is pretty thorough. Interestingly though they mention the names of several “tools” that have implemented TrackBack (as
<strong> no less) they don’t link to any of them. If you’re not familiar with Trackback go read the first section of that to get up to speed.
A commonly requested feature is the ability to send a trackback ping when editing an entry. This has been especially needed since we’ve implemented post status flags (so you can, for example, save your post as a draft and work on it later). There are a couple of logical steps to implementing this, the first of which being that we need to track what pings have and haven’t been sent yet. Then the posting code had to modified a bit to only send trackback pings when an entry was published, and to not ping a URI that had been pinged before, et cetera. Not terribly hard stuff, just a bit of code to go through and some testing to make sure everything worked right.
Now that we have a nice record of pings that have been sent, I thought it would be nice to add that data to the default template for WordPress, as Trackback suffers from the same one-way linking problem it was trying to solve. That is, if I trackback another site my ping will show up in their comments or their trackbacks, but there’s nothing on my site indicating I sent that ping.
Then I realized that this set of pinged URIs I had was close to useless. What does a URI like
http://www.movabletype.org/mt/trackback/55 mean anyway? If you enter it in your browser you get an XML error back. If you append a query string to it with
?__mode=rss with some implementations you will get a RSS .91 feed of trackbacks sent from that entry, from which you could extract the actual URI of the resource that
http://www.movabletype.org/mt/trackback/55 is relevant to, but what a hassle. You can sweep things like this under the rug with a convoluted “auto-discovery” functionality (which is using sloppily embedded RDF instead of
<link>… why?) but these problems are easy enough to solve that they should be.
(A side note, a URI tied to a unique ID system specific to a particular software platform does very little to suggest permanence to me. Are we going to have sent ping URI link rot?)