WordPress.org

Support

Support » How-To and Troubleshooting » RSS Doesn’t Work – XML Parsing Error

RSS Doesn’t Work – XML Parsing Error

Viewing 15 replies - 1 through 15 (of 62 total)
  • Moderator Samuel Wood (Otto)

    @otto42

    WordPress.org Tech Dude

    You have the blank line problem.

    See here: http://validator.w3.org/feed/docs/error/WPBlankLine.html

    I’m getting almost the same error message:

    XML Parsing Error: xml declaration not at start of external entity
    Location: http://media-visions.com/media_reports/?feed=rss2
    Line Number 2, Column 1:<?xml version=”1.0″ encoding=”UTF-8″?>

    As recommended, I’ve checked all the files cited in this post:
    http://validator.w3.org/feed/docs/error/WPBlankLine.html

    The error is still occurring, and it occurs no matter which theme I install.

    This is the blog at issue:
    http://media-visions.com/media_reports/

    FYI:
    My other blog is generally working:
    http://media-visions.com/globalsenseblog/feed/

    But it puts this note on top of the feed readout:

    This XML file does not appear to have any style information associated with it. The document tree is shown below.

    I tried a workaround by copping all of the php files cited by Validator (except config.php) from the functional blog to the dysfunctional blog, and that made no difference. I still get the same RSS error as at the top of this email.

    Any helpful guidance will be appreciated!

    Moderator Samuel Wood (Otto)

    @otto42

    WordPress.org Tech Dude

    judahfreed: You also have the blank line problem. And nobody here can really give you any better advice than that page:

    Check your wp-config.php file for blank lines outside of <? and ?> bracketed sections.

    Check your theme’s functions.php file for blank lines outside of <? and ?> bracketed sections. (unlikely if it happens on all themes)

    One by one, disable plugins and revalidate until you isolate the one causing the problem.

    That’s really all there is to it. Something, somewhere, is adding blank lines to your site. It’s probably a plugin or the wp-config file. But it can be any file, we have no way to help you track it down other than what you have already read.

    Thanks for your response.

    I have been through all of the cited files, I deleted every blank line in the code on these pages, so there is code on every line, no empty lines. However, this yielded no change in the RSS failure. perhaps I did not do this process correctly?

    I also went through all of my plugins, disabling one at a time, and in no case did the RSS start functioning. Then I disabled all the plugins at once, again I still got the same CMP parsing error.

    My best hope now is to request more information, more clarification. When you say:

    Check your wp-config.php file for blank lines outside of <? and ?> bracketed sections.

    What EXACTLY am I supposed to be catching? Can you use different words to describe what I’m supposed to be finding and fixing?

    Even better, can you please post a before and after example from a php file? I tend to be a visual learner. If I can see an example, I likely can understand better.

    Thanks!

    Moderator Samuel Wood (Otto)

    @otto42

    WordPress.org Tech Dude

    What EXACTLY am I supposed to be catching? Can you use different words to describe what I’m supposed to be finding and fixing?

    Look for blank lines at the beginning or end of the file.

    For the specific example of the wp-config.php file, and the plugin files, the very first characters in the file must be <?php and the very last characters must be ?>. Nothing is allowed outside of those. Nothing is allowed after the final ?>. Some text editors add blank lines to the end of files when you edit them: Use better text editors (TextPad, Notepad, etc).

    The upshot here is that when the file is parsed by PHP, it must produce no output. A blank line, a space, a carriage return, anything at all outside the <?php and ?> bits *will* produce output.

    Blank lines in the CODE don’t make any difference. Blank lines outside the code sections do.

    The WordPress files that you download from here do not have any blank line problems like this in them. However, if you load them up in a crappy editor, and save them, then the editor may add such problems.

    To help myself find where to make the correction with the blank line, I ran Feed Validator at my blog:
    http://feedvalidator.org/check.cgi?url=http%3A%2F%2Fmedia-visions.com
    With these results:

    Sorry
    This feed does not validate.
    *
    line 1, column 1: Blank line before XML declaration [help]
    ^

    In addition, interoperability with the widest range of feed readers
    could be improved by implementing the following recommendation.
    *
    line 47, column 1: Missing atom:link with rel=”self” [help]
    </channel>
    ^

    Source: http://media-visions.com/media_reports/feed/

    1.
    2. <?xml version=”1.0″ encoding=”UTF-8″?><!– generator=”wordpress/
    2.0.2″ –>
    3. <rss version=”2.0″
    etc…

    MY PROBLEMS:

    1) I DO NOT HAVE ANY SUBDIRECTORY IN MY BLOG CALLED “FEED” —
    So I cannot find the file that has the blank line before the XML Declaration “<?xml version=”1.0″ ….”

    Please advise me on WHERE to look for this error. Which file among the dozens of php files in my blog is responsible for this line error?

    2) I am unclear which php file contains the error:

    line 47, column 1: Missing atom:link with rel=”self”

    I’ve tried a search in TextWrangler without finding the two code strings at issue. Likely the answer is in plain sight, but I’m still a newbie. So I may be missing the obvious.

    FYI. Feed Validator said:

    Solution

    If you haven’t already done so, declare the Atom namespace at the top of your feed, thus:

    <rss version=”2.0″ xmlns:atom=”http://www.w3.org/2005/Atom”>

    Then insert a atom:link to your feed in the channel section. Below is an example to get you started. Be sure to replace the value of the href attribute with the URL of your feed.

    HOWEVER: even when I figure out (with your help) which php file to correct, I still do not know where in the file to insert the suggested code.

    Thanks for helping me.
    jf

    Oh WOW. This whole time, it was because I was typing in the feed address without the ‘www’. I typed it in with the ‘www’ and it works perfectly, why would that make a difference?

    Also, I need to have the ‘/’ at the end or it does not work as well.

    Weird, now it doesn’t work again, even though i did not change anything.

    What are the problems with not having your feed working?

    I am having same issue, but with version 2.5

    same here.
    Can’t find a break line that bothering.
    Keep changing theme and keep having same problem.
    It must be from other than theme’s functions.php.
    Can somebody pinpoint the location?

    YEAH!!!!!

    Ok – I had added mighty ad sense code to my sidebar from the theme editor.
    I took that one line out and now my rss feed works, YEAH!

    Thank you.

    HOWEVER when I save my rss feed to an rss reader it says
    TITLE UNKNOWN

    How do I fix this?

    Thanks
    Dee

    Hello, this is dyam again.
    If anyone using WordPress on yahoo hosting service with small business plan, kept having the same problem like mine, you need to install this from scratch. I found this url http://natespost.com/index.php/install-wordpress-on-yahoo-server/ after I posted last night. I did it so just as this page explains and my problem is solved. Thanks guys. Ciao ciao.

    I have been going crazy trying to figure this out. I even removed the xml statement and transferred it to the top line in the wp-rss2 file in php echo format, yes it still showed SEVEN lines of blank space which made absolutely no sense. I saw a post above about the www so I added it into the url and lo and behold…it works.

    For what it is worth, I have Yahoo and did their auto-install for version 2.3.3 (I was amazed they upgraded it from 2.0.2 after 2 years…) and then upgraded to 2.5.1

    I had this problem, I looked in the junk plug-ins yahoo gives you.

    Just about all of them had a blank space at the very end of the file below the closing ?>

    I removed them…and it works.

    Hope this helps someone out there.

Viewing 15 replies - 1 through 15 (of 62 total)
  • The topic ‘RSS Doesn’t Work – XML Parsing Error’ is closed to new replies.