Issue with my comments-only feed

This entry was published at least two years ago (originally posted on February 9, 2004). Since that time the information may have become outdated or my beliefs may have changed (in general, assume a more open and liberal current viewpoint). A fuller disclaimer is available.

I have no idea if anyone other than myself is currently subscribing to my ‘comments only’ RSS feed, but I’ve noticed an odd issue with it that I haven’t been able to troubleshoot yet. I’ve asked for help on the TypePad User Group, but I wanted to mention it here too, in case anyone else has been noticing this or might be able to point out what I’m doing wrong.

What I’ve been finding is that each item in my comment-only feed is being given the date of the original post that the comment is appended to, rather than the date that the comment was added to my site. For instance, a comment added today to a post from August shows up in my newsreader with the August date instead of today’s.

Here’s the code I’m using for each item in the RSS feed template (the full template code can be found in this post from last week):

<MTComments lastn="20">
<MTCommentEntry> 
<item> 
<title><$MTEntryTitle remove_html="1" encode_xml="1"$></title> 
<link><$MTEntryPermalink encode_xml="1"$>#c<$MTCommentID$></link> 
<description><$MTCommentBody remove_html="1" encode_xml="1"$></description> 
<guid isPermaLink="false"><$MTCommentID$>@<$MTBlogURL$></guid> 
<content:encoded><![CDATA[<MTCommentAuthorLink show_email="0"> on 
<MTCommentDate format="%b %e, %Y %l:%M %p">: <$MTCommentBody$>]]></content:encoded> 
<dc:date><$MTCommentDate format="%Y-%m-%dT%H:%M:%S"$><$MTBlogTimezone$></dc:date> 
</item>
</MTCommentEntry>
</MTComments>

Now, it all looks right to me, and the same basic code seems to be working in all the rest of my templates (for instance, in the ‘full posts plus comments’ RSS feed, each comment begins with a header that lists the correct date). For some reason, though, it’s not working here.

Any ideas?

Update: The issue has been fixed. Turns out that you can’t use an <MTCommentDate> tag inside an <MTCommentEntry> container (much thanks to Jamie Jamison for pointing me to the explanation).

The solution was fairly easy (and the code in my ‘how-to’ post has been updated): I just removed the date display from the body of the RSS item, and moved the closing <MTCommentEntry> tag up a couple lines. Here’s the new version of the above code:

<MTComments lastn="20">
<item> 
<MTCommentEntry> 
<title><$MTEntryTitle remove_html="1" encode_xml="1"$></title> 
<link><$MTEntryPermalink encode_xml="1"$>#c<$MTCommentID$></link> 
<description><$MTCommentBody remove_html="1" encode_xml="1"$></description> 
<guid isPermaLink="false"><$MTCommentID$>@<$MTBlogURL$></guid> 
<content:encoded><![CDATA[<MTCommentAuthorLink show_email="0">: <$MTCommentBody$>]]></content:encoded>
</MTCommentEntry>
<dc:date><$MTCommentDate format="%Y-%m-%dT%H:%M:%S"$><$MTBlogTimezone$></dc:date> 
</item>
</MTComments>