WordPress.org

Forums

invalid rss feed (4 posts)

  1. lambic
    Member
    Posted 10 years ago #

    According to feedvalidator.org, my rss feed is broken. I have no idea where to look to fix it, any help?
    Here's what it says:
    * line 3, column 0: XML Parsing error: <unknown>:3:0: xml declaration not at start of external entity [help]
    <?xml version="1.0" encoding="utf-8"?>
    Source: http://www.lambic.co.uk/blog/feed/rss2/
    1.
    2.
    3. <?xml version="1.0" encoding="utf-8"?>
    4. <!-- generator="wordpress/1.3-alpha-4" -->
    5. <rss version="2.0"
    6. xmlns:content="http://purl.org/rss/1.0/modules/content/"
    7. xmlns:wfw="http://wellformedweb.org/CommentAPI/"
    8. >

  2. lambic
    Member
    Posted 10 years ago #

    Here is the first bit of wp-rss2.php:

    <?php
    if (!isset($feed) || !$feed) {
    $blog = 1;
    $doing_rss = 1;
    require('wp-blog-header.php');
    }
    header('Content-type: text/xml; charset=' . get_settings('blog_charset'), true);
    $more = 1;
    ?>
    <?php echo '<?xml version="1.0" encoding="'.get_settings('blog_charset').'"?'.'>'; ?>

    I tried squishing everything up into 1 php block with no blank lines, but that didn't make any difference. I also tried commenting out the header call, but that just made things worse.

  3. lambic
    Member
    Posted 10 years ago #

    phew, that was a journey...
    I went from wp-rss2.php to wp-blog-header.php to wp-settings.php and finally tracked it down to the moment when the plugins get loaded. Then I went through each plugin until I tracked it down to random_file.php, which turned out to have a couple of stray ctrl-m characters at the end. Cleaned that up, et voila, a valid rss feed!

  4. indi
    Member
    Posted 9 years ago #

    in my case a beta of Textile 2 was messing up the feed

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.