WordPress.org

Ready to get started?Download WordPress

Forums

RSS 2.0 Feeds not validating because of a blank line (12 posts)

  1. Frobenius
    Member
    Posted 9 years ago #

    My WordPress 1.5.1.3 RSS 2.0 feeds are not validating, in certain instances, because of a spurious blank line that appears at the top of the feed. The extra blank line ONLY appears when the url ends with a trailing slash. For example:

    With permalinks turned on, the url generated by the bloginfo('rss2_url'); function always ends with a trailing slash, so the feed does not validate. I just can't figure out which modules are being called that could possibly be adding a blank line. I tried disabling the usual suspects (plugins, themes, etc.), but that blank line always shows up. I have peeked at all the modules that should be loading, but nothing obvious can be found. I've looked through the .htaccess file generated by WordPress, but I can't find anything out of place there, either.

    Can someone tell me what the difference is between a WordPress url with a trailing slash and a WordPress url without a trailing slash? What extra redirect module is called in one case vs. another?

  2. Kafkaesqui

    Posted 9 years ago #

    This is not a feed problem, or a problem with a trailing slash in your urls. If you look at the source of your blog's home page through your browser, you'll find the same initial blank line at the top.

    Something in WordPress--possibly a plugin, though it could be any edited file--is causing the extra line to appear. The culprit behind this is often an extraneous line appearing in the code of a PHP file, meaning an empty line before the initial <?php or after the final ?>.

  3. Frobenius
    Member
    Posted 8 years ago #

    The thing is this: with a trailing slash I get a blank line. Without the trailing slash I don't get the blank line. Of course it's not the slash causing the problem, but the pages are processed differently when the slash is part of the url. Some page is being called when there IS a slash that is NOT being called when there ISN'T a slash. It's not a plugin because when I disabled them I had the same results. It's pretty much a straight build, so I don't believe there are stray linefeeds that have been added after the install. This seems to be a common problem with WordPress that defies a simple explaination. So ... where's that line coming from, anyway?

  4. There is a blank line either at the beginning or the end of one of your WordPress files. Please do not assume that there are none. We are trying to help you. Please make an attempt to investigate all of your WordPress files. You are correct that this is an odd error that happens quite frequently, but there has always been one solution. One of your WordPress files has an extra blank line either at the beginning or the end of the file.

  5. More inf0:

    Neither http://www.valenceband.com/wp/feed nor http://www.valenceband.com/wp/feed/ validate. There is a blankline at the top of each feed. The same is true if you view the source of your site. There is a blank line at the top of both http://www.valenceband.com/wp/rsp/19 and http://www.valenceband.com/wp/rsp/19/ . Again, one of your WordPress files has an extra blank line either at the beginning or the end of the file. There is no way to discover which file this is. You will have to make the effort to investigate all of your WordPress files.

  6. SoFlaChris
    Member
    Posted 8 years ago #

    Hello,

    If this is a thread hijack, please advise and I'll make a seperate post. From reading the above, may I assume that this is the same problem that I'm having? See: http://www.feedvalidator.org/check.cgi?url=http%3A%2F%2Fblog.maltese.net%2F%3Ffeed%3Drss

    Are there some places that I can check. I have disabled all of my plugins to no avail. The only file that I've messed-with is my sidebar on the blog.

    TIA,
    Chris

  7. tomhanna
    Member
    Posted 8 years ago #

    http://wordpress.org/support/topic/7713 addresses your issue and possible causes. Whitespace in the wp-blog-header.php caused this problem for one person, could be a bad version of that file out there.

  8. SoFlaChris
    Member
    Posted 8 years ago #

    Thanks, Tom. I edited out all of the whitespace in the wp-blog-header.php to no avail. Still looking...

  9. tomhanna
    Member
    Posted 8 years ago #

    Refresh your browser. Your feed is working fine for me now.

  10. SoFlaChris
    Member
    Posted 8 years ago #

    Hi Tom... I found the bad plugin: PhotoPress. I cleared the whitespace and my aggregator feeds my site. Yet, when I try to see my feeds in Firefox, they still come back as bad.

    Feedvalidator now sees them as good... What gives?

  11. tomhanna
    Member
    Posted 8 years ago #

    I'm seeing this URL - http://blog.maltese.net/?feed=rss - just fine with Firefox.

    I was able to add the feed to My Yahoo without any problems, too.

    Try clearing your browser cache and cookies, shutting down Firefox and restarting it?

  12. SoFlaChris
    Member
    Posted 8 years ago #

    Hi Tom,

    You're the man. I cleared the cache and cookies; all works well. It's always the simple things that are overlooked when I troubleshoot.

    Thanks again for all of your help.

    Chris

Topic Closed

This topic has been closed to new replies.

About this Topic