I’ve got a line of whitespace being inserted at the top of my Atom feeds that is causing it to break. I’ve read through posts here about similar problems but none of the proposed fixes have worked for me. The feed is being sent as text/xml, the template type is “RSS page”, caching is off, I’m not using any PHP in it, and I’ve removed all whitespace from the top of the template. I’m using EE 1.6, build 20070708. I have two feeds on this site and both are broken in this way.
Interestingly, I’ve got a testing site set up with this same EE build and the feed works fine there. Copying that template verbatim into the broken one, only changing the weblog name, doesn’t fix it, which makes no sense to me. I’ve also replaced this template with the one provided on the EE site and that still doesn’t do it.
These are the first two lines of the template:
{exp:rss:feed weblog="durtro"}
<?xml version="1.0" encoding="{encoding}"?>The feed validator is telling me:
* line 2, column 0: XML parsing error: <unknown>🔢0: xml declaration not at start of external entity
And this is backed up by what I’m seeing when I fetch the feed myself:
$ curl <a href="http://www.softblackstars.org/durtro/feed">http://www.softblackstars.org/durtro/feed</a>
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">The feed is located at http://www.softblackstars.org/durtro/feed
What could be causing this?