Help - Search - Members - Calendar
Full Version: Date won't show up in RSS feed
Movable Type Community Forum > Additional Resources > Tips and Tricks
emsdc
Hi,
I can't seem to get the publication date to display for my news feed. Here's my code:

CODE
<MTEntries lastn="10">
<item>
<title><$MTEntryTitle regex="1" remove_html="1"$></title>
<link><$MTEntryPermalink$></link>
<description>Source: <$MTEntryBody regex="1" convert_breaks="0"$></description>
<dc:date><$MTEntryDate$></dc:date>
</item>
</MTEntries>


I'm using CaRP to display the feed on a test page at
http://www.ems.org/syndicate_test.php

The entry title displays, the entry body is there, but there's no date.

Thanks,
Ryan
TweezerMan
My guess is that the date is not properly formatted for an RSS feed.

In my RSS 1.0 Index template, the entry date looks like this:

CODE
<dc:date><$MTEntryDate format="%Y-%m-%dT%H:%M:%S" language="en"$><$MTBlogTimezone$></dc:date>

And my RSS 2.0 Index template has this:

CODE
<dc:date><$MTEntryDate format="%Y-%m-%dT%H:%M:%S"$><$MTBlogTimezone$></dc:date>

Either one should work for what you're doing.
emsdc
No such luck. I changed the date format and it's still not showing up in my test feed. Here's the code for my entire XML file. I don't see anything wrong with it...

CODE
<?xml version="1.0" encoding="<$MTPublishCharset$>"?>
<rss version="2.0"
 xmlns:dc="http://purl.org/dc/elements/1.1/"
 xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
 xmlns:admin="http://webns.net/mvcb/"
 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">

<channel>

<description><$MTBlogDescription remove_html="1" encode_xml="1"$></description>
<dc:language>en-us</dc:language>
<dc:creator><MTEntries lastn="1"><$MTEntryAuthorEmail$></MTEntries></dc:creator>
<dc:date><MTEntries lastn="1"><$MTEntryDate format="%Y-%m-%dT%H:%M:%S"$><$MTBlogTimezone$></MTEntries></dc:date>
<admin:generatorAgent rdf:resource="http://www.movabletype.org/?v=<$MTVersion$>" />
<sy:updatePeriod>hourly</sy:updatePeriod>
<sy:updateFrequency>60</sy:updateFrequency>
<sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>

<MTEntries lastn="5">
<item>
<title><$MTEntryTitle regex="1" remove_html="1"$></title>
<link><$MTEntryPermalink$></link>
<description>ySource: <$MTEntryBody regex="1" convert_breaks="0"$></description>
<dc:date><$MTEntryDate format="%Y-%m-%dT%H:%M:%S"$><$MTBlogTimezone$></dc:date>
</item>
</MTEntries>


</channel>
</rss>  
emsdc
Actually, it looks like the XML file is fine...

So it must be a problem with CaRP.
TweezerMan
What version of CaRP are you using? From CaRP's configuration page:

QUOTE
Note that the free version of CaRP does not support the image, date and author fields.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.