21278 Posts in 5728 Topics by 2599 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 831 Views |
-
Tutorial 2 - RSS Feeds

25 February 2009 at 5:32pm
Have completed the section concerning adding a RSS feed to the News page. I have faithfully followed the tutorial withou making any modifications. The RSS icon lights up on the news page but when I select the option I get the following error message.
Invalid xml declaration.
Line: 2 Character: 3<?xml version="1.0"?>
Can anyone help?
-
Re: Tutorial 2 - RSS Feeds

18 June 2009 at 8:20am
I have run into the same problem. After some searching of the forum I found a crude fix posted by another member which solves the problem by adding the following line at 189 to sapphire/api/RSSfeed.php:
$body=str_replace("<?xml version=\"1.0\"?>","",$body);
echo $body;Original post by bruceb can be viewed here http://www.silverstripe.org/general-questions/show/260501#post260501
The root of the problem appears to be being caused by a space being inserted into the top of the page html code before the Doc type declaration. I have swapped between the tutorial and Black Candy Theme but it seems to be the same in both. I have looked in the template files and in the class files for spaces but it all looks fine to me.
Has anyone got any ideas to what could be causing this? Any ideas are welcomed...
| 831 Views | ||
|
Page:
1
|
Go to Top |

