views:

97

answers:

5

Hi,

I've installed the wordpress.org script however the RSS feed just sends me errors. I've tried to edit files within the wordpress like wp-rss2.php to remove "?" from the first line but it does not work and I am not sure what else could be wrong.

The feed is here: http://www.donaha.sk/feed

I haven't found anything on Mr. Google so far.

ANSWER: I was running in Slovak language mode. I changed back to EN_US and problem was resolved. The solution is not evident but it works for me. Thank you for help but none of the answers were correct.

A: 

Hey.

Looks like there are some junk characters in front of the XML declaration. Try opening the file that generates it in something like Notepad++, put the cursor at the very beginning of the file and hit the back-space button a couple of times.

If you copy the XML source from your feed and paste it into Notepad++, you can see that the first character in the source has an odd dot in front of it. You can also see this in the error message Firefox generates when the feed is opened.

This is what is causing the error. You need to find where it is being printed and remove it, which is most likely at the very top of the PHP script that generates the feed.

Atli
This is the first echo line of that file that tris to print output: echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>'; ?>
Skuta
Did you try to open the fine in Notepad++?Try that, make sure you place the cursor at the very start of the file and press back-space a few times.Also, go to "Format->Encode in UTF-8 Without BOM" and "Format->Convert to UTF-8 Without BOM".That should remove any hidden characters in front of the text.
Atli
+1  A: 

Your feed starts with four (not one, not two, not three, but four :-) UTF-8 Byte Order Marks. Look:

C:\temp>od -c index.html.1
0000000 357 273 277 357 273 277 357 273 277 357 273 277   <   ?   x   m
0000020   l       v   e   r   s   i   o   n   =   "   1   .   0   "

You need to reduce that one or zero BOMs.

There's a chance that whatever editor you're using isn't showing them to you - try a different editor... I was able to remove them with SciTE by loading the file, hitting the Del key until the leading < disappeared, retyping that <, and saving the file. The resulting file then had a single BOM, and Firefox was then happy to load it.

RichieHindle
A: 

Editing the core WP files was probably an incorrect move. This was possibly being caused by your theme or a plugin incorrectly sending characters at the wrong time. A default install of WordPress should cause no validation errors with the feed.

You may want to try undoing your changes to the WordPress core files and deactivate your plugins to see if that fixes it. Then you can re-enable them one by one to find the one causing the issue.

If the plugins aren't causing it then try activating the default theme and see if it is fixed then. If it is then it was your theme causing the issue.

Matt Walters
the only plugins running are akismet and add to facebook which imho do not do anything to it
Skuta
A: 

Are you running WP in the root directory, or using one of the configurations to run the index at the root level as an illusion? If the latter, one of your plugins might be foolishly hard-coding a path to a core file that isn't there with your installation. And instead of spitting out data into the feed, it's spitting out nonsense.

4.669201
It is in the root directory.
Skuta
+1  A: 

Your theme incorrrectly puts in an XML UTF declaration before the doctype in header.php:

<?xml version="1.0" encoding="UTF-8"?>

according to [Invalid] Markup Validation of www.donaha.sk/ - W3C Markup Validator

Delete that and see if it fixes your UTF problems.

songdogtech
No, it did not solve the problem.
Skuta
Try reuploading your core wordpress files; maybe one got damaged on the initial install. Happens many times, according to the Wordpress forums.
songdogtech