Page 1 of 1

RSS/AtoM feeds not working

Posted: Mon Apr 23, 2007 3:58 am
by Melanieofsydney
I get the following error or very similar for all the feeds from my blog

XML Parsing Error: xml declaration not at start of external entity
Location: http://www.melanieofsydney.com/serendip ... /index.rss
Line Number 2, Column 1:<?xml version="1.0" encoding="utf-8" ?>
^

It had worked previously so I have evidently broken it somewhere.

Recent changes I have made
* another meta tag in template
* added the taget="_blank" thing for the js url thing
* turned on html rewriting

The URL is www.melanieofsydney.com/serendipity/

Also is there someway to make the feeds appear in the top directory, apparently google would like this.

Thanks

Re: RSS/AtoM feeds not working

Posted: Mon Apr 23, 2007 12:51 pm
by garvinhicking
Hi!

You seem to have added an extra linebreak/space before the first <?php or after the last ?> of some .php file somewhere.

Sadly PHP is hard to debug in that case, so you will need to check every single file you edited to spot extra linebreaks.

Best regards,
Garvin

Posted: Mon Apr 23, 2007 4:13 pm
by Melanieofsydney
so im looking for a line break before a <?php or after a ?>
even though the error talks about like breaks with <?xml

?

another question should every php file end with a ?> because they don't

I am missing a recent comment and one of my replies, and my style was changed so i am wondering if someone has been in my site causing issues.

Posted: Mon Apr 23, 2007 4:48 pm
by garvinhicking
Hi!

That's true, because before <?xml is emitted, all .php files are executed, including language files, plugins etc.

In fact it's better if a php file does not end with "?>" because then you have one less chance of accidentaly putting a linebreak there. Ending ?> are optional.

HTH,
Garvin

Posted: Mon Apr 23, 2007 5:46 pm
by Melanieofsydney
I got sick of look and re downloaded serendipity and replaced and reuploaded all the files i had locally except my index file wheich i checked through and the one javascript file. It is still broken!

I have no idea where the break is at all now as anything i potentially touched as been put back with nice fresh files.

:(

Posted: Mon Apr 23, 2007 7:40 pm
by judebert
When I view the source of that page, it looks like there is no preceeding carriage return before the <?xml. Is it an HTML header or something?

Posted: Mon Apr 23, 2007 7:45 pm
by Melanieofsydney
i never changed anything to do with feeds, so their shouldn't be any header for them. Rest of the pages are fine or at least appear to be.

Posted: Tue Apr 24, 2007 10:05 am
by garvinhicking
Hi!

The extra blank must come from somewhere. The typical places it could come from are:

- Any *.php files of plugins you are using
- Any lang*.inc.php files of plugins you are using
- Any serendipity_lang_XX.inc.php language file you might have edited
- Your template's config.inc.php file
- Any possible global auto_prepend PHP directives through .htaccess

Since you say you reuploaded all native s9y files, the change might only be caused by a template's config.inc.php file or custom .htaccesss directives or plugins you downloaded via spartacus and modified locally?

HTH,
Garvin

Posted: Tue Apr 24, 2007 11:46 am
by Melanieofsydney
it was in the config.inc file there was a spare line - i was sure i overwrote that before - so now it's fixed!

then style change came from me accidentally over writing the style.css in my template :|

But it all works again! YaY!