Regarding Enclosures

whether it works with MT4, and what that really means for Movable Type(though not Wordpress)

There's been a fair bit of talk over the past week or so about a rant posted by Todd Cochrane at Geek News Central regarding Movable Type 4's (lack of) support for external enclosures. Fair enough on that point and the referred Six Apart blog post overstating its case a little. MT's product manager Byrne Reese scrambled to write an intial version of a plugin rectifying that situation and awaits feedback from Cochrane.

But there's a little detail that's been dropped in the middle of all of this, and in the middle of the rant itself, for that matter:

For the past three years we have relied upon a “single plugin” from Brandon Fuller to allow MovableType users to post our podcast and have compliant RSS feeds with Enclosures:“All was well”.

That single plugin which started all of this is Enclosures, and it doesn't work with MT4.

Well...

We have one anecdotal claim to such(Cochrane), and another from Chad Everett during the course of a Pronet thread discussing this saying it does for a client of his. David Jacobs at Apperceptive has also stated that they use a modified version of the plugin, though because of that we'll have to remove them from consideration. So does it work or not? Nobody's actually tested, right? So let's.

First, I accept that the plugin really wasn't working for Cochrane in the case of whatever he was doing, which is a very different thing from it Not Working, as is his claim.

Second, I follow my own common suggestion in the forum when there's a question about plugin compatibility and Just Try It. The plan was to install MT4 with the Enclosures plugin on multiple hosts and see what happens. This was to allow for the possibility that there was something about the GNC environment causing the plugin to fail, particularly seeing as they just moved to a new server.

I already knew I wasn't on their Christmas card list, so their server was out of the question, but I could still use machines I could access to either confirm the problem, or collect more successful cases. So I settled on shared accounts from Dreamhost and Pair, and a MediaTemple dv3 server. In the end, I didn't get past Dreamhost, though if someone wants to challenge my findings, I'll be happy to follow through with the others, or they can download the necessary files near the end.

The setup

I installed a stock copy of MT4.01, along with the Enclosures plugin, and nothing more. Six Apart can't be held accountable for third-party plugins interfering with each other. In my experience this has been extremely rare, but no point tainting the experiment. All bundled plugins were left in place, since they are responsible for those. The only further modification was replacing the default RSS template with the one employed by GNC, provided by Cochrane in the forum thread linked above.

Next three entries were created, in HTML, Textile and Markdown formats(in case that was a factor), with links to MP3s at five different sources: a self-hosted show, Odeo, Switchpod, Libsyn, and Blubrry, whom GNC use(again, in case source was a factor).

Results?

To be completely honest, I expected the output to reveal the plugin as fully functional, but the end result was just confusing at first.

The regular entry content was published to the feed as usual, but there were only five enclosure elements, when there should have been fifteen. All five were attached to the HTML-formatted entry. As a test to see if the duplication of links was somehow being detected and consolidated(unlikely, but we're trying to avoid assumptions), I unpublished the HTML entry, and they promptly disappeared. And finally, I went into the Textile entry, copied a paragraph and edited its link to raw HTML rather than Textile's "text":url format, and came out with six enclosures in the feed. Obviously the text formatting is a factor here, but there's another detail missing: Cochrane's claim that everything was perfectly fine under MT3.35

The second setup

On the same server, I installed a stock copy of MT3.35, along with the Enclosures, Textile, and Markdown plugins. Again, all bundled plugins were left in place, the only change was replacing the default RSS template with GNC's, and the three entries were published using their appropriate formatting option. The output behavior was absolutely identical. (I tested editing the Markdown entry in this case.)

Conclusions

It seems clear that the Enclosures plugin does work under MT4, as long as the links to your media files are in proper HTML a href etc. format. More importantly, this requirement/limitation does not appear to be new. We can only guess that something in Cochrane's, or Geek News' usage has changed which put them into one of the non-functional use cases. I've left a comment on Cochrane's post asking what text formatting he used pre- and post-MT4, and whether he was manually inputting link markup in each case. It is in moderation as of this writing.

Even more importantly, the plugin's failure is not, as seems to be the implication, at the fault of Movable Type, but the plugin itself. If anyone would like to corroborate this, or prove me wrong, I've created an archive with GNC's feed template, the entries I created, and the two output files I ended up with for comparison. Please post results on your own sites and link back here.

It seems reasonable to guess that Fuller never tested with anything other than raw HTML, though the issue was at least hinted at by "Funtime Ben" on October 23, 2004 in a comment where he mentions using Textile to bypass Enclosure's discovery of linked media.

Enclosures uses regular expressions to pick out the a tags in entry content and figure out whether their targets are external. I can only guess that at the time this process is triggered during rebuilding, the text formatting filters haven't been applied yet, and so there are no a tags but the Textile or Markdown formats instead. I'll have to defer to the plugin developers on that should they feel like following up. I can interpret what's going on in their code up to a certain point, but we're getting deeper into MT's process than I can trace.

Is this really important?

Well, sort of. Some might argue Enclosures is redundant in light of Byrne's new Podcasting plugin, though there's always the possibility of someone not wanting to use the asset manager to deal with their media. Choice is good. According to some Pronet members, however, Enclosures could use some work/optimization.

Beyond the question of relevance, we've still learned some things:

  • "Isn't working for me" does not equal "incompatible." Specificity in complaints goes a long way toward determining which is the case.
  • MT's backward-compatibility record for non-interface plugins remains strong. MT4 introduced DOM-like methods for modifying the interface that should help strengthen that even more.

1 TrackBacks

Listed below are links to blogs that reference this entry: Regarding Enclosures.

TrackBack URL for this entry: http://mt.onmovabletype.com/cgi-bin/mt/mt-tb.cgi/3

» links for Monday, November 05 from majordojo

Regarding EnclosuresExcellent and detailed analysis of Movable Type's support for podcasting and enclosures. Movable Type can definitely improve - there is no doubt - but it is good to see some root cause analysis of Geek News Central's issues posted... Read More

Respond

(PLEASE NOTE This is not a comment form as generally understood, and your message will not likely ever be published wholesale, though I retain the right to or to quote anything you submit. Behave yourselves.)
Powered by Movable Type 4.01 and a growing collection of plugins

Feeds

About this Entry

This page contains a single entry by Su published on November 4, 2007 8:54 AM.

Find recent content on the main index or look in the archives to find all content.