• Clicked on my feed link and I got the following error
    =======
    XML Parsing Error: XML or text declaration not at start of entity
    Location: https://www.running-contacts.com/rcblog/feed/
    Line Number 2, Column 1:

    <?xml version=”1.0″ encoding=”UTF-8″?>
    ^
    =========
    Did view source and <?xml etc is the second line first line is blank

    Feed was fine previously
    Where should I begin to try to solve this?

    WP 2.7.1

    Thanks for any assistance

Viewing 8 replies - 16 through 23 (of 23 total)
  • I had no problem viewing my RSS feed when I was developing locally, but once I copied all the files to my webserver I was getting this error. When I viewed source of my /feed/ URL, I could see there was a line break before the XML declaration at the top of the file.

    Since the exact same files were working on my localhost installation, I knew it wasn’t due to any plugins or trailing whitespace at the end of any of my files because that would have caused an issue on my local copy as well.

    Somehow I was able to fix the problem by opening wp-includes/feed-rss2.php, making a change in the file, saving it, uploading it, undoing the change (so it was exactly the same as before), and then uploading again. No clue why that fixed it, but it did.. there’s no longer a blank line being output at the beginning of the XML file.

    HTH someone..

    Hi folk,

    This problem occurs because of the leading space before xml content.

    I faced the same problem and then i found the solution at
    https://www.w3it.org/blog/wordpress-feed-error-output-solution-how-to/

    And it works pretty well for me.

    Hope, it could be helpful to someone!!!!!!!!

    Regards,
    https://www.google.com/profiles/sachinpethani

    Hello

    I have this problem on https://www.thewhatwherewhen.org

    I have gone through my files and can not see the line

    I have done this
    https://www.w3it.org/blog/wordpress-feed-error-output-solution-how-to/
    and this
    https://wejn.org/stuff/wejnswpwhitespacefix.php.html

    I have disabled all my plugins and still have this problem

    Can anyone help?

    Thanks

    IdeFixx

    (@idefixx)

    [letsnurture]: Thank you very much for this solution of broken RSS feed, it works, it’s simple and it take much shorter time then looking everywhere in core/templates files… I’d say 5 minutes? ??

    shirasmane

    (@shirasmane)

    Hello,

    I am facing the same problem on my site https://www.iplt20livecricketscorescard.com

    I have checked all the php files in my theme as well as wordpress root files and removed all the white spaces & blanks

    But still no success.

    Please help.

    Thanks

    shirasmane

    (@shirasmane)

    the solution mentioned in the above link https://www.w3it.org/blog/wordpress-feed-error-output-solution-how-to/ worked for me.

    I added following code to wp-includes/feed-rss2.php and it worked

    $out = ob_get_contents();
    $out = str_replace(array(“\n”, “\r”, “\t”, ” “), “”, $input);
    ob_end_clean();

    However when first I applied the above code it did not work, then I realized that ‘WP Super Cache’ may be showing the same page again, I deleted all the cached pages and it started working.

    thank you all.

    This solution work
    https://www.w3it.org/blog/wordpress-feed-error-output-solution-how-to/

    But it cause few problem in my site, first my index was completely broken. Then still none of my feedburner feed updated, i pinged few times, still same old post.

    I had the same problem on my site and this post helped. I just searched for how to remove spaces in front of <?xml. The solution that worked for me was to check my PHP files for spaces or other unseen characters before the first <?php tag in every file included / required to render the page producing the error. According to the advice I found, this is a known issue with PHP and also goes for any characters after the last ?> tag. (Including “\n” – line feed character). I hope this helps someone speed up their fault find.

Viewing 8 replies - 16 through 23 (of 23 total)
  • The topic ‘No RSS – XML parsing error’ is closed to new replies.