WordPress.org

Ready to get started?Download WordPress

Forums

RSS error: Extra content at the end of the document (22 posts)

  1. Adriaandejongh
    Member
    Posted 11 months ago #

    Hello!

    My RSS feed won't stop giving errors. Right now, it's says "Extra content at the end of the document" and I don't understand where it's coming from.

    http://gameovenstudios.com/feed/

    An RSS Validator shows that the RSS feed also includes the entire HTML page of my website, which shouldn't be the case I guess?

    Anyone has an idea on how to fix it?

    -Adriaan

  2. Scriptrunner (Doug Sparling)
    Member
    Posted 11 months ago #

    I've seen some plugins added extra content at the end of a feed. Have you tried deactivating your plugins (assuming you're using any) and switching to a default theme like twentytwelve or twentythirteen?

  3. Adriaandejongh
    Member
    Posted 11 months ago #

    Even with the default theme ( on http://gameovenstudios.com/wordpress/ and http://gameovenstudios.com/wordpress/feed/ ) it still prints the entire page at the bottom of the feed... What should normally stop the page from running? The .htaccess file maybe?

  4. Adriaandejongh
    Member
    Posted 11 months ago #

    The question is, I guess, how can I stop the HTLM code from printing after parsing the RSS feed?

  5. Scriptrunner (Doug Sparling)
    Member
    Posted 11 months ago #

    Have you tried deactivating all your plugins? I've typically seen this happen with plugins that don't take into account for non-html output (like an XML/RSS or JSON feeds).

  6. Adriaandejongh
    Member
    Posted 11 months ago #

    The only plugin I use is Disqus for comments, and deactivating it helps nothing.

    Something I should mention: I integrated the loop into my own website. Could that be the cause of all troubles? Is there something that theme's do that I should be doing as well?

  7. Scriptrunner (Doug Sparling)
    Member
    Posted 11 months ago #

    Is your website the one the feed is attached to? (Not sure I'm following you here...)

    Are you using a filter on the_content anywhere?

    And anyway you could comment out the loop in your website to test?

  8. Adriaandejongh
    Member
    Posted 11 months ago #

    At the bottom of the RSS feed, my entire website also gets printed, yes. Not using filters. Commenting out my loop also doesn't solve the problem.

    Any other suggestions?

  9. Scriptrunner (Doug Sparling)
    Member
    Posted 11 months ago #

    Strange, I'll have to think on it. I looked through the feed.php in core to see what it was doing, but the only possible I think I could think of on first glance was something to do with the_content.

  10. Adriaandejongh
    Member
    Posted 11 months ago #

    Question: what should stop the execution of the rest of the page when it IS working?

  11. esmi
    Forum Moderator
    Posted 11 months ago #

    Try checking your site's error logs for messages. Your hosts should be able to help you accessing your site's error logs.

  12. Adriaandejongh
    Member
    Posted 11 months ago #

    Where should I look for when I want to find my site's error logs? (Like, do the logs have a specific name?)

  13. esmi
    Forum Moderator
    Posted 11 months ago #

    Usually they're literally called error.log but this could vary from host to host. You need to ask your hosts for assistance with accessing yours.

  14. Scriptrunner (Doug Sparling)
    Member
    Posted 11 months ago #

    The error log may or may not be of help depending on what the issue is.

    How comfortable are you editing files?

    It looks like in a default configuration, your feed is coming from

    wp-includes/feed-rss2.php

    You might be able to edit that and see if you get any changes or where the extra html is coming from. One caveat, you'll need to disable Magpie cache on the RSS feed, which is actually pretty easy.

    To do that, open up (around line 645 in WordPress 3.6.1)

    wp-includes/rss.php

    and change

    if ( !defined('MAGPIE_CACHE_AGE') ) {
        define('MAGPIE_CACHE_AGE', 60*60); // one hour
    }

    to

    if ( !defined('MAGPIE_CACHE_AGE') ) {
        //define('MAGPIE_CACHE_AGE', 60*60); // one hour
        define('MAGPIE_CACHE_AGE', 0);
    }

    Then you should be able to edit wp-includes/feed-rss2.php though you may need to do a full refresh on your browser with each change.

    This about all I can do with the info given. A bit of a mystery, I've never seen a full html page added to the end of an RSS feed before (only error messages). If it makes a difference, it looks like the latest post (Our Team) is what's being added.

    A second caveat - I'm assuming it's the rss2 (default) feed. Given the link you provided, it should be.

  15. Adriaandejongh
    Member
    Posted 11 months ago #

    I put the following at the end of the wp-includes/feed-rss2.php file:

    <?php
    exit;
    ?>

    Now everything works like a charm! Am I doing wordpress damage now, by inserting this?

  16. Scriptrunner (Doug Sparling)
    Member
    Posted 11 months ago #

    No damage, but keep in mind you've updated a core file, so:

    1) It didn't fix the root cause of the problem
    2) You'll have to repeat each time you upgrade WordPress

    But at least you're back in business and if you feel courageous, you can poke around. I really can't tell much more from here :)

    I'm just trying to think what would cause it to keep processing. I'll follow the trail a bit further...maybe not until tomorrow, though.

  17. Scriptrunner (Doug Sparling)
    Member
    Posted 11 months ago #

    Just for the heck of it, look in

    wp-includes/template-loader.php

    and see if this bit of code is in there, particularly the return statement:

    elseif ( is_feed() ) :
        do_feed();
        return;

    It almost acts like it's continuing on down to the remaining template logic, which would cause a page to be spit out after the feed.

  18. modifiedcontent
    Member
    Posted 10 months ago #

    This is a recurring problem for me that makes WordPress RSS feeds pretty much useless. Uninstalling plugins one by one or searching for whitespaces in files really isn't a solution.

    Please WordPress/Automattic, fix this.

    BTW, I tried this RSS feed repair plugin and it killed the feed entirely. All these fixes - dodgy plugins, editing core files, etc. - are only creating more problems.

  19. WPyogi
    Volunteer Moderator
    Posted 10 months ago #

    @modifiedcontent - please start your own thread if you need help or have a suggestion as per:

    http://codex.wordpress.org/Forum_Welcome#Where_To_Post

  20. modifiedcontent
    Member
    Posted 10 months ago #

    @WPyogi, these RSS feed errors seem to be all variations of the same problem. I have posted several threads about it that went nowhere and have seen others do the same.

    Usually these threads end with the standard 'uninstall all plugins one by one' advice, but there is never a real solution.

    I have also tried the solutions in this thread without success. This looked like another dying 'broken RSS feed' thread, so I posted to try to keep it alive.

  21. WPyogi
    Volunteer Moderator
    Posted 10 months ago #

    I'm sorry you have not gotten help with this issue, but it just does not work well to have multiple conversations in the same thread - and it's highly unlikely that your site is identical to the OP's -

    http://codex.wordpress.org/Forum_Welcome#Where_To_Post

  22. infinitenothing
    Member
    Posted 7 months ago #

    I seem to be experiencing a similar issue and none of the above solutions are helping.

    http://justinroether.com/feed/

    Any suggestions?

Reply

You must log in to post.

About this Topic

Tags