• Resolved Dgold

    (@dgold)


    I’m having a problem in my Feed, suddenly it isn’t Valid. Please advise me how to fix it, where to look for the source of this error?

    Sorry – This feed does not validate.

    line 1, column 1: XML parsing error: <unknown>:1:1: xml declaration not at start of external entity [help]
               <?xml version="1.0" encoding="UTF-8"?>
               ^

    In addition, this feed has an issue that may cause problems for some users. Feeds should not be served with the “text/html” media type

    I looked in wp-includes/feed-rss2.php and found the code that WP uses to make my feed starts with this, which appears relevant:

    <?php
    header('Content-type: text/xml; charset=' . get_option('blog_charset'), true);
    $more = 1;
    
    ?>
    <?php echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>'; ?>

    Is it correct?

    After upgrading to WP 2.2 I noticed the problem. I also recently moved to another server (at my same host), to get the newer PHP and MySQL and cPanel so that I could run WP 2.1+. I also run the PodPress plugin that handles enclosures in my feed, but I don’t think that is related to this problem since the error is on Line 1 of a section totally generated by WordPress, and the feed was working perfectly with Podpress and WP 2.0.x, the problem arrived with WP 2.2 and/or the newer MySQL.

    What is causing my feed problem?

Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter Dgold

    (@dgold)

    Hi, my feed is broken and it’s causing me problems. Any ideas?

    Please, I need help here, this is a timely issue for me.

    Would you consider sharing a link?

    Thread Starter Dgold

    (@dgold)

    Mr. Solo, I sent you my link via Contact Form on your site. Thanks for taking a look.

    To explain, I don’t like posting my link on here for various personal reasons. Hope you understand. Anyone who really wants to see, just google ‘dgold radio’. I’m working on the /radio part of the site, not the root.

    The feed is of course at mydomain.com/radio/feed

    For continuities sake, here was my email response from earlier today:

    Real quick, I’m in between meetings at work. ??

    You have a leading space at the very beginning, and an extra blank line for line 3.

    I’d start by going through plugins (and widget files if applicable) looking for extra spaces or line feeds before the opening <?php statement or after the last ?>.

    Thread Starter Dgold

    (@dgold)

    I’m glad you posted that here, because I didn’t get your email reply. Maybe I gave you the wrong email addy for me on your comment form?

    Thanks for the clearly-worded advice. Another helper told me to check for blank-space before the php opening statement, but he did not mention checking after the closing. I already checked all my plugins before the opening, none had a space. Now I will check the ending of them.

    Are there any other php files besides plugins that I need to check for spaces? I checked a few in wp-includes/ such as feed-rss2.php and feeds.php. The only core-file I’ve modified is wp-login.php, I’ll check it again too.

    Question: Why would a plugin affect my feed? I understand if it’s a plugin that deals with feeds like Podpress or FeedSmith, but what about the other plugins? Do I really need to check Akismet and WordCount and Custom Smileys? I will check them, just trying to understand.

    Thread Starter Dgold

    (@dgold)

    HandySolo was correct. I found a space at the end of a plugin file & deleted it.

    This fixed 2 major errors I was having (this thread, plus another thread about blank pages in the admin). Impressive.

    Thanks again for reminding me to do the most basic diagnostic technique: de-activate ALL plugins, and Re-activate one by one until the error pops up. I did that, and when I found 1 plugin causing both errors, I looked and there WAS a space at the end after-all.

    I’m not sure if it is related, but I’ve been having problems with Atom feeds and punctuation in the title of a post. I never had the Atom feed totally borked until after the upgrade to WordPress 2.2. Prior, if I had an apostrophe in a title, the feed would have some odd characters where the apostrophe was supposed to be, but after the upgrade, I couldn’t get any feedreader to connect. I went through https://www.feedvalidator.org and found that the apostrophe was being replaced by the string “%e2%80%99”. FeedValidator stated that it SHOULD be “%E2%80%99”. I had to go into the actual MySQL database to change this. The difference being uppercase versus lowercase letters. I had another one that had the string “%e2%80%a6” when it should have been “%E2%80%A6”. It was a pain to change it the way I did. After doing so, I was able to load my feeds and it checked out fine. Why are these characters being coded incorrectly? In case it matters, my encoding is set to UTF-8.

    Dgold, which plugin was the problem?

    Thread Starter Dgold

    (@dgold)

    I don’t remember which plugin it was, archsk. It was a plugin which I had opened in a text-editor, to look at it, and I guess I saved it with a “space” at the end by accident.

    It’s actually not THAT hard to check all your plugins, I think I checked about 15 before I found my error that time, ha. As soon as I got to that plugin, I remembered “oh YEAH, i did mess around with this one”

    Same problem – waiting for solve… fresh files after upgrade. (2.3.3)

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘RSS Feed Validation Problem in 2.2’ is closed to new replies.