WordPress.org

Ready to get started?Download WordPress

Forums

Blank lines at top of feeds: breaking validation - how to fix? (7 posts)

  1. paul
    Member
    Posted 9 years ago #

    this seems to be 1.5 problem. some users claim that replacing the offending feed templates will fix it (hasn't worked for me). others claim some plugins are at fault (not for me: I turned them all off to no avail).

    What's the fix for a feed that fails to validate due to an empty first line.

    http://feedvalidator.org/check.cgi?url=http%3A%2F%2Fpaulbeard.org%2Fwordpress%2Fwp-rss2.php

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

  2. angsuman
    Member
    Posted 9 years ago #

    Normally this happens due to a plugin. Please check that there are no extra spaces at the beginning (before <?php tag) and after ?> tag. Otherwise just disable all plugins. Once it starts working, activate one by one and see which one is creating the problem.

    Otherwise reinstall the php files again. that should fix it.

    I am running wp 1.5 from January approx and I never faced any problems with any aggregator except bloglet (which itself is defective).

    Hope that helps.

  3. paul
    Member
    Posted 9 years ago #

    I guess you missed the part where I disabled all plugins and it still failed? and where I replaced the php files with fresh ones from a new download?

    It's all very well to say no aggregators choke on the feed: but does it validate? I don't want to go with RSS where we once were with HTML: works here, doesn't work there.

  4. Kafkaesqui

    Posted 9 years ago #

    Paul, if you look at the source for your blog home page you'll find the same extraneous empty first line there as well. So whatever is doing this is inherent in your WordPress install as a whole, not just the feed.

    I've worked through this with a few other users to the point where they had to reinstall WordPress to clear it (though that's not always the case), and all I can suggest at this time is to try and go over any and all php files you may have edited to make sure no additional spaces or lines exist before opening <?php tags, and after closing ?> tags.

  5. paul
    Member
    Posted 9 years ago #

    So what's the deal here? some sites validate out of the box[tm] and others don't?

    I could reinstall but there should should some less onerous way of resolving this.

  6. paul
    Member
    Posted 9 years ago #

    Well, that does resolve it. I don't know what to make of that. I'll see if adding themes back as well as plugins breaks anything.

  7. Kafkaesqui

    Posted 9 years ago #

    The issue here is that WordPress is not distributed as a single executable or binary installation.

    As a collection of PHP script documents, WordPress' source has the potential to get borked in any number of ways, from editing of the files, to the ftp upload, and perhaps even a rogue process on the server. PHP is a great programming tool, but it's design openness can lead to the occasional (and sometimes not so occasional) difficulty getting everything set up just right.

Topic Closed

This topic has been closed to new replies.

About this Topic