Problems, need help? Have a tip or advice? Post it here.
8 posts Page 1 of 1
Hi,

I want to add a fee to an rss reader from my blog.

I have folllowed the tutorial on this CouchCMS site to add an RSS feed (http://www.couchcms.com/docs/concepts/rss-feeds.html), and it displays in the browser - but I cannot add the feed to a feed reader (i.e. feed.ly) - i think this is due to the URL changing from rss,xml to rss.php.

Does anyone have any pointers on how to get the feed working in an RSS reader?

Thanks!
Andy
I haven't had any issues adding Couch RSS feeds to feedly. It is the Content-Type header that matters; whether the URL ends with '.xml' or '.php' is immaterial.

Do post your rss.php code and let us know what kind of error feedly shows.
Thanks for coming back to me.
This is the code I'm using - maybe I have missed something?


<?php require_once( 'admin/cms.php' ); ?>
<cms:concat '<' '?xml version="1.0" encoding="' k_site_charset '"?' '>' />
<rss version="2.0">
<channel>
<title>Life Matter Blog</title>
<link><cms:show k_site_link /></link>
<description>News and articles that affect your life!</description>
<language>en-en</language>
<pubDate><cms:date format='D, d M Y H:i:s' gmt='1'/> GMT</pubDate>
<generator>Couch CMS</generator>

<cms:pages masterpage='index.php' limit="10">

<item>
<title><cms:show k_page_title /></title>
<link><cms:show k_page_link /></link>
<description>
<cms:html_encode>
<cms:excerptHTML><cms:show blog_content /></cms:excerptHTML>
</cms:html_encode>
</description>
<pubDate><cms:date k_page_date format='D, d M Y H:i:s' gmt='1'/> GMT</pubDate>
</item>
</cms:pages>

</channel>
</rss>
<?php COUCH::invoke(); ?>
Hi,

As cheesypoof pointed out - "It is the Content-Type header that matters" and that is precisely what is missing from your code
<?php require_once( 'admin/cms.php' ); ?>
<cms:content_type 'text/xml' /><cms:concat '<' '?xml version="1.0" encoding="' k_site_charset '"?' '>' />

Please add the highlighted cms:content_type tag (taking care to place it on the same line as the cms:concat and with no spaces between the two) and that should resolve the issue.

Hope this helps.
Ahh school boy error!
I will give that a go

Thanks!

Andy
Hi - I have added the content type code - but now when I visit the URL:

domain.com/blog/rss.php

it gets renamed to:

domain.com/blog/rss/

Which gives a 'page not found' error.

I assume this is something to do with the htaccess file, but I dont' know how to fix it - any ideas?
Please use gen_htaccess.php to regenerate the .htaccess file so as to include the new rss template in it.
Ah thanks - I have done that now - thanks so much for your help!
8 posts Page 1 of 1