Blog Module RSS issue

silverstripe-3
Tags: #<Tag:0x00007f0826b1ccd8>

#1

Silverstripe Version 3.6
Silverstripe blog module v2.4.2

Hi has anyone found that the silverstripe blog module generates RSS with an extra line (white space) at line 1
I want to link this rss feed to mailchimp, but mailchimp reports the feed as being invalid.
Below is the first 12 lines of the rss feed from the news blog page. I have checked out the RSSfeed.ss and RSSfeed.php files all seem to be ok. We are using a slightly older silverstripe version on another website with the same blog module and the rss feeds don’t generate any white space on the 1st line.
the did try and archive the news posts and create a new post. but the whitespace remains.

1
2 <?xml version="1.0"?>
3 rss version=“2.0” xmlns:dc=http://purl.org/dc/elements/1.1/ xmlns:atom=http://www.w3.org/2005/Atom>
4 channel>
5 title>News/title>
6 http://riobravotest01.co.nz/news/
7 atom:link href=http://riobravotest01.co.nz/news/" rel=“self” type=“application/rss+xml” />
8 description>
9
10 item>
11
12 title>AFAM Terminal Installation Kit/title>

I had to leave off the < character so the above code would be display correctly in this post.

I would appreciate any help on this issue as we would like link our website to mailchimp.

cheers Stuart


#2

I have resolved this problem. The whitespace was on the first line on all pages not just the RSS feed.
It was caused by an empty line before the initial “<?php” in a php file inside the mysite folder.