« How To Change the Default Image Upload Location in Movable Type 4.0 | Main | Working with Movable Type 4.0 Templates: Sidebar »

How to Fix a Common MT4 Feed Formatting Error

Over the last few years, the term beta has been somewhat misused. It used to be that when you used beta software, you expected to encounter problems. But when Google started throwing around the term for its offerings, people came to expect that beta software wasn't so bad. Still need an example? Despite Gmail arguably being the leader in web-based email systems, it's had that tag for more than two years.

There are plenty of examples, but hopefully you get the point I'm trying to make - that beta just doesn't mean what it used to. So there really shouldn't be a surprise that people install beta software. It used to be that only a certain crowd would install beta software, but these days, just about everyone will do so, thinking that they can expect to get what they have come to expect. That's not always the case, as sometimes you can get nasty surprises.

One of those surprises comes in the form of a malformed feed in MT4. Take a look at this screenshot (thanks Tim for letting me use you for this exercise!).


You may notice that there is absolutely no formatting within. Luckily, there is also a very easy fix for the problem. But first, a small explanation of exactly what is happening.

When MT 4.01 was released, the release notes said that a bug (#56367 for those keeping track) had been fixed. We were told that the formatting for Markdown was not processing correctly in feeds. In actuality, this isn't really accurate.

The problem doesn't have anything specifically to do with Markdown - it has to do instead with the fact that in an earlier beta of MT4 distributed feeds with the wrong attribute on the MTEntryBody and MTEntryMore tags. It may look like any of these:

<$MTEntryBody encode_xml="1" convert_breaks="0"$>
<$MTEntryMore encode_xml="1" convert_breaks="0"$>
<$MTEntryBody encode_xml="1" convert_linebreaks="1"$>
<$MTEntryMore encode_xml="1" convert_linebreaks="1"$>

What is happening is that the convert attribute - whichever one you are using - will override your text filter (perhaps Markdown, as Tim was using in the screenshot above) and you will end up with garbage. To correct the problem, simply load up your feed templates and change the lines to this:

<$MTEntryBody encode_xml="1"$>
<$MTEntryMore encode_xml="1"$>

You may need to do a bit of digging, because if you are using something like the Continue Reading link, the fields might not be right next to each other. Also, make sure that you check for both Atom and RSS templates, because both will be affected by this "bug".

If the first version of MT that you installed was after MT4 and prior to 4.01RC2, then you may be affected by this, so check your templates. If you upgraded your blog from a previous MT release, then you should be fine - as long as you don't create a new blog using the default templates before you upgrade to MT 4.01. Finally, if you haven't upgraded to MT 4.01, you should do so now!

This tutorial is written by LMT author Chad Everett of Everitz Consulting.
Tutorial cross posted on Don't Back Down and LMT.

Comments (3)

Actually, Chad, this same problem shows in many, many V3.3 MT blogs as well. I can't say all, because I don't know for sure which ones that aren't showing the problem have been edited, but it's pretty common.

So not a 'beta' issue, per se, but really valuable to have the fix described here.


Hi Paul -

That's really helpful to know. I hadn't actually seen it until the release of MT4 - this may be because a lot of folks didn't get "hit" until the release of new templates or something, but it wouldn't surprise me to see that it had been around a while longer and only now came to light. Thanks for the information!

Thanks for this - it has been bugging me for sooooo long! I figured it might magically fix itself when I upgraded to MT 4 but it didn't so finding a fix that works is great!

Post a comment

(If you haven't left a comment here before, your comment may need to be approved before will appear on the entry. Thanks for waiting.)