0

I'm running out of ideas, could you please tell me what am I doing wrong? When trying to validate my rss feed I get the error that pubDate is in incorrect format. Even though it looks the same as advised in specs (well to me at this stage). Can you spot the error?

{preload_replace:master_channel_name="blog_post"}
{exp:rss:feed channel="{master_channel_name}" debug="yes"}

<?xml version="1.0" encoding="{encoding}"?>
<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#"
    xmlns:content="http://purl.org/rss/1.0/modules/content/"
    xmlns:atom="http://www.w3.org/2005/Atom">

    <channel>
    <atom:link href="http://www.yourpeakstate.com" rel="self" type="application/rss+xml" />
    <atom:link href='http://pubsubhubbub.superfeedr.com/' rel='hub' />
    <title><![CDATA[{channel_name}]]></title>
    <link>{site_url}</link>
    <description>{channel_description}</description>
    <dc:language>{channel_language}</dc:language>
    <dc:creator>{email}</dc:creator>
    <dc:rights>Copyright {gmt_date format="%Y"}</dc:rights>
    <admin:generatorAgent rdf:resource="http://expressionengine.com/" />

{exp:channel:entries channel="blog_post" limit="10" dynamic_start="on" disable="member_data"}
     <item>
       <title>{exp:xml_encode}{title}{/exp:xml_encode}</title>
       <link>{page_url}</link>
       <dc:creator>{author_name}</dc:creator>
       <pubDate> {gmt_entry_date format="%D, %j %M %Y %H:%i:%s %Q"} </pubDate> 
       <guid>{page_url}#When:{gmt_entry_date format="%H:%i:%sZ"}</guid>
       <description><![CDATA[<img src="{main_post_image}" alt="{post_title} - Your Peak State"> {blog_content_1} {blog_content_2}]]></description> 
       <dc:subject>{exp:xml_encode}{categories backspace="1"}{category_name}, {/categories}{/exp:xml_encode}</dc:subject>
     </item>
{/exp:channel:entries} 

    </channel>
</rss>

{/exp:rss:feed}

Here is validation error: https://validator.w3.org/feed/check.cgi?url=http%3A%2F%2Fwww.yourpeakstate.com%2Frss%2Farticle-feed

I might be blind though as I've been looking at this for the past 2 hours...

It Tells me this should be the output:

<pubDate>Wed, 02 Oct 2002 08:00:00 EST</pubDate>
<pubDate>Wed, 02 Oct 2002 13:00:00 GMT</pubDate>
<pubDate>Wed, 02 Oct 2002 15:00:00 +0200</pubDate>

But this is the output I get:

<pubDate>Thu, 06 Aug 2015 17:50:00 +00:00</pubDate>
2

Ok I figured out what is the problem. This is the correct, pubDate format incase someone else encounters this problem in the future...

<pubDate> {gmt_entry_date format="%r"} </pubDate>

I spent 2 hours for simple thing like this... Might save someone else the time in the future.. You're Welcome

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.