Feeds not served as xml (13 posts)

  1. sitapati
    Posted 9 years ago #

    My feed from http://www.sitapati.info, recently upgraded from 1.5 to 2.0, is no longer being served as xml. http://www.feedvalidator.org/check.cgi?url=http%3A%2F%2Fwww.sitapati.info%2Fwp-rss2.php%2F shows the feed and the errors.

    I haven't changed any code, and I do have a few plugins enabled - but just the ones I had enabled for 1.5.

    Any ideas?

  2. Mine passes validation, so your issue must be either plugin or server related, probably the 2nd. In what way, not a clue. :|

  3. Try disabling all of your active plugins, then check your feed's validation again.

  4. Mmm, you're right, a plugin could be sending a header or spitting out a space or something.

  5. sitapati
    Posted 9 years ago #

    Here's the first few lines of wp-rss2.php:


    if (empty($wp)) {

    header('Content-type: text/xml; charset=' . get_settings('blog_charset'), true);
    $more = 1;

    <?php echo '<?xml version="1.0" encoding="'.get_settings('blog_charset').'"?'.'>'; ?>

    The xml version line is output, but the header line is not, which is why feedvalidator complains about it being sent as text/html. At the same time two blank lines are put into the feed.

    Any ideas on why? My php-fu is pretty weak.

  6. Did you "try disabling all of your active plugins, then check your feed's validation again"?

  7. Mark (podz)
    Support Maven
    Posted 9 years ago #

    sitapati - your error has nothing to do with plugins or anything you can actually do. This error is reported here infrequently (I would say most people do not validate their feeds) and it quite literally goes away all on it's own.
    It's more than likely - as Viper007bond has said - to be a server related issue but despite the best efforts of people who have had this, no-one seems able to pin down the precise and consistent cause.

  8. Podz, most of the time that I have seen that error reported here, it has been due to an extra blank line either at the top or bottom of a plugin file or a core WordPress file. I always suggest the plugins first, because their on/off switch make them easy to troubleshoot.

  9. Mark (podz)
    Support Maven
    Posted 9 years ago #

    I. If it were a core file, then every feed would be invalid, the problem identified and cured.

    2. If it were a plugin, then that too would be identified.

    Some very knowledgeable forum members who know their way around servers / php and validation extremely well have faced this issue and did not discover the cause.

  10. Every time I have dealt with this, it was usually related to someone poking around in a file where they shouldn't or an FTP editor adding something to the file as it uploads. Basically, this is the syndicated feed's version of "headers already sent" (explain how that one happens all the time).

    Sorry, but every time I have handled one of these cases, it has been related to an extra blank line in either a plugin or core file. I guess that we have both seen two similar, yet different, issues.

  11. I wouldn't rule out either personally.

  12. josalmon
    Posted 9 years ago #

    I just had this problem and have identified what caused it.

    Checked the feed validator and it said this:

    Sorry, This feed does not validate.

    line 1, column 1: XML parsing error: <unknown>:1:1: xml declaration not at start of external entity

    As macmanx advised, I turned off all my plugins and then tried it again. Bingo, it worked! I installed two plugins yesterday so switched on everything except those two and the feed still validaed.

    In the end it turned out to be Ozh's WordPress Admin Drop Down Menu

  13. sitapati
    Posted 9 years ago #

    Thanks for the tips guys. I did the elimination of the plugins, and it turned out to be Elliot Back's WordPress Hashcash.


Topic Closed

This topic has been closed to new replies.

About this Topic