WordPress.org

Ready to get started?Download WordPress

Forums

Feeds stopped working! Help!!! (13 posts)

  1. magneto_ms
    Member
    Posted 5 years ago #

    Hello,

    I have just found to my horror that the feeds of of my wordpress site is not validating any more and is giving up the following error:

    XML parsing failed: syntax error (Line: 2, Character: 0)
    
    Reparse document as HTML
    Error:XML declaration not at beginning of document
    Specification:http://www.w3.org/TR/REC-xml/
      1:
      2: <?xml version="1.0" encoding="UTF-8"?>
      3: <rss version="2.0"
      4: 	xmlns:content="http://purl.org/rss/1.0/modules/content/"
      5: 	xmlns:wfw="http://wellformedweb.org/CommentAPI/"

    Here is my website: http://www.home-designing.com

    This has happened for no apparent reason I can think of. It is just that one fine day it just has stopped functioning. It is not a problem with feedburner as I tried it after disabling the Feedsmith plugin and it still gives the error.

    Any help would be hugely appreciated!!

  2. simplygrey
    Member
    Posted 5 years ago #

    Yep. Same thing for me. Here's the error message I'm getting with three out of four of my WordPress.org blogs:

    XML Parsing Error: XML or text declaration not at start of entity
    Location: http://www.speculate.it/index.php/feed/
    Line Number 2, Column 1:<?xml version="1.0" encoding="UTF-8"?>
    ^

    I upgraded my blogs to ver. 2.7 shortly after it was released, but don't know if the feeds got broken immediately or not. With the holidays and all, I didn't really pay much attention to it. I just noticed the problem today when changing the theme for one of my blogs.

    My three blogs that don't work are:

    http://www.speculate.it
    http://www.speculate.it/sf/
    http://www.drane.it

    And the one that still works:

    http://www.drane.it/it/ (the Italian version of drane.it above)

    Now I'm going to see if I can tell what's different about the one that's working and will report back if I find anything.

    ~G

  3. simplygrey
    Member
    Posted 5 years ago #

    Hmm... Not sure how helpful this is going to be, but I've found that there were a bunch of extra blank lines in my wp-config.php files. A blank line had been inserted between each line of code in that file, and replacing it with the backup on my computer without all those extra lines fixed my feeds.

    I had read that you sometimes need to delete blank lines that get stuck at the end of that file (and others), but just getting rid of the blank lines at the end didn't fix my feeds. Hmm... although thinking about it now, maybe I didn't clear my browser's cache before retrying....

    Anyway, the weird thing is that my one blog that still worked had the same messed up wp-config.php file as all the others. Dunno.

    Long story short, check your .php files for blank lines at the end and/or alternating throughout the code.

    HTH

    ~G

  4. magneto_ms
    Member
    Posted 5 years ago #

    God, I never wanted to mess with the core files. But if that is what it takes, let's get this thing done with. Can you tell me which php files I need to edit and where?

  5. magneto_ms
    Member
    Posted 5 years ago #

    Need help.. urgent!!

  6. Samuel Wood (Otto)
    Tech Ninja
    Posted 5 years ago #

    magneto_ms: Remove the ending ?> from your wp-config.php file.

  7. magneto_ms
    Member
    Posted 5 years ago #

    @Otto42: I tried removing the ?> as you suggested. But still no luck.

    Also, removed the whitepsaces. Additionally I deactivated the Feedsmith plugin until this gets resolved. What is the issue due to? Is it a 2.7 bug?

  8. AskMichele
    Member
    Posted 5 years ago #

    I am also having the same problem. It happened out of nowhere before I upgraded to 2.7

    Thought upgrading may rectify it, but no such luck.
    Now no one can subscribe to my blog nor is it being fed to other sites I have it linked to.

    I never play around with the core configuration so I don't know how that would change.

    This is a typical error message:
    XML Parsing Error: XML or text declaration not at start of entity
    Location: http://askmicheleweeks.com/blog/?feed=rss2
    Line Number 2, Column 1:<?xml version="1.0" encoding="UTF-8"?>
    ^

    Any help would be appreciated.
    Thanks,
    Michele

  9. AskMichele
    Member
    Posted 5 years ago #

    I realize now that I had this same problem a couple months back and I ended up having to change my WP Theme to correct it, but now it's back.

    I don't really want to change my theme every couple of months. I need to create a consistent identity and there seems to be no simple solution to this very big problem.

    I'm not a programmer and going into the ftp files to change configurations is too much to expect for the layperson to have to do to use WP.

    I truly think this is a bug that needs to be resolved from WPs end.

  10. Samuel Wood (Otto)
    Tech Ninja
    Posted 5 years ago #

    magneto_ms: The wp-config.php is the most likely place, but it could be anywhere. Notable locations are in plugins or in the theme's functions.php file. Theme and plugin authors are often not as careful about ending blank lines, which can cause this issue.

    AskMichele: There's nothing wrong with your RSS feed. I just took a look, and you don't have the blank line problem like you state above.

    I'm not a programmer and going into the ftp files to change configurations is too much to expect for the layperson to have to do to use WP.

    Editing text files is one of the fundamental things you need to do to run any type of website. If you can't do that, then you need to not be running your own website on your own hosting. Instead you should use a service to manage your site for you, such as WordPress.com or Blogger.

    I truly think this is a bug that needs to be resolved from WPs end.

    This is *not* a WordPress bug. It's due to the fundamental way PHP works. A blank line at the end of a file, after the ?> causes a blank line to be output, which breaks the feeds. WordPress can't work around this. So saying that WordPress needs to address it is rather pointless, when it's not specifically a WordPress problem.

  11. magneto_ms
    Member
    Posted 5 years ago #

    @Otto42: Thanks, I think the functions.php file was the culprit. Got it working after I removed some of the whitespaces there. Whew! That was scary!

    Noticed another weird thing though, the feed is not redirecting to Feedburner now even after i reactivate the Feedsmith plugin. Any thoughts on this? Could this issue be connected to the one before? I tried uninstaling and reinstalling feedburner though.

  12. magneto_ms
    Member
    Posted 5 years ago #

    Okay, that feedburner re-direction thing sorted itself out! Talk about a weird day at the office!

    My advice to anyone who is undergoing the frustration of figuring out the problem would be first to go through any changes you have made recently to the .php files of your theme.(for which you don't need ftp and you can do this from the wordpress admin itself) Remove unnecessary whitespaces from the end. Usually it is the problem with the theme files getting tampered with, though it is also wise to check the wp-config.php file for this. If you can't figure this out yourself, then maybe seek the help of your theme author.

  13. llamaman
    Member
    Posted 5 years ago #

    I had the same issue with the blank line in my RSS feed. Once I removed extra blank lines in my config.php and functions.php files, I had to clear my WordPress cache (i.e. SuperCache). That might be why @magneto_ms' issue resolved itself over time - cleared cache.

Topic Closed

This topic has been closed to new replies.

About this Topic