The MU forums have moved to WordPress.org

Feed does not validate (18 posts)

  1. frankpereiro
    Member
    Posted 17 years ago #

    Hi everyone,

    I went onto FeedBurner and when I tried to add my feed (http://www.beisblogs.com/feed/), it gave an error. So I went onto the validator site and this error came up:

    http://feedvalidator.org/check.cgi?url=http://www.beisblogs.com/feed/

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

    <?xml version="1.0" encoding="UTF-8"?>

    Does anyone know how to fix this? Otherwise, I won't be able to add my feed to feedburner.

    Thanks,

  2. drmike
    Member
    Posted 17 years ago #

    For some reason, the feed is stepping down a line. Note that your error is for line #2, not #1 where it should be.

    Someone's going to have to check on this for me as I'm on one of my locked down terminals today and can't pull anything up.

  3. frankpereiro
    Member
    Posted 17 years ago #

    I've been trying to get an answer over at the WP forums and de WP.com forums but couldn't find anything. I didn't ask, I just searched, but still no answers.

    I also read something that Matt wrote about the validator making rules of their own as if they were the standards in RSS.

    Maybe the MU developers could find an answer to this. I've checked other MU sites and tried to validate their feeds and they all had some kind of error, not the same as mine, though.

    The fuuny thing, though, is that Google reader, just to name one RSS reader, accepts the feed, no prblem.

    Anyway, I'll just have to keep looking for an answer or find another service like feedburner, do you know of another one?

    Greetz,

  4. drmike
    Member
    Posted 17 years ago #

    The issue is it's adding an empty line. You can see it when you run the validator. Google reader just probably ignores it. The error even tells you that: "not at start"

  5. frankpereiro
    Member
    Posted 17 years ago #

    Well, I did open all the rrs files and files related, and cleaned up some white spaces but the problem remains.

    I noticed that drmike's feeds validate, the only MU site that I've checked so far that does.

    I deactivated all the plugins and such but no results.

    Anyway, I'll keep looking at the files thru the weekend and will try to fix my feeds.

    The forum hasn't been helpful since I've done a lot of searches and haven't been able to find an answer to this problem.

    If I happen to fix this I'll post it here.

    Greetz,

  6. frankpereiro
    Member
    Posted 17 years ago #

    What buggles me is all the feeds (RSS, RDF, ATOM) have the linespace in line one. I know that is only one file that's doing this, all I have to do is check all of them.

    I have homework for the weeked.

  7. drmike
    Member
    Posted 17 years ago #

    That is strange. You don't have any feed plugins or anything like that, do you?

  8. frankpereiro
    Member
    Posted 17 years ago #

    No, I don't have any feed plugins, in fact, I don't have many plugins yet, only a few (6 plugins maybe).

    Anyway, what I've noticed is that your site says that you're using version 1.1 and another site that also validates, which name I forgot, also says that it's using version 1.1 of WPMU.

    My site, as well as others I've seen, are using at least version 1.1.1 of WPMU. I don't know if this has anything to do with this.

    Anyway, I will follow your advise and will deactivate all the plugins. If this solves the error I will then activate the plugins one by one until I get the one that's bugging my feeds.

    If that doen't solve anything, then I'll have to check all my feed files and check them one by one.

    Thanks for the suggestion, drmike. Greetz.

  9. frankpereiro
    Member
    Posted 17 years ago #

    Ok, I deactivated all the plguins but now I have this:

    line 6, column 1: XML parsing error: <unknown>:6:1: not well-formed (invalid token) [help]

    <channel> ^

    In case the blockquote doesn't show properly, this is the link to the validation:

    http://feedvalidator.org/check.cgi?url=http://beisblogs.com/feed/

    Any suggestions?

  10. frankpereiro
    Member
    Posted 17 years ago #

    Got it drmike, the solution was really, really, really, simple.

    You see, the "feed-rss2.php" file in the wp-includes directory beigns as:


    <?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').'"?'.'>'; ?>
    <!-- generator="wordpress/<?php bloginfo_rss('version') ?>" -->
    <rss version="2.0"
    xmlns:content="http://purl.org/rss/1.0/modules/content/"
    xmlns:wfw="http://wellformedweb.org/CommentAPI/"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    <?php do_action('rss2_ns'); ?>
    <channel>

    I added a ">" at the end right after the do_actio('rss2_ns')....as this:


    <?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').'"?'.'>'; ?>
    <!-- generator="wordpress/<?php bloginfo_rss('version') ?>" -->
    <rss version="2.0"
    xmlns:content="http://purl.org/rss/1.0/modules/content/"
    xmlns:wfw="http://wellformedweb.org/CommentAPI/"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    <?php do_action('rss2_ns'); ?> >
    <channel>

    And that solved it. My feeds now validate and I can now use feedburner for stats, and also have my feeds in any rss reader there is.

    Thanks a lot drmike for being there with me in all this giving support. Sorry for all this too.

    Now, I have to check the other files, RDF and ATOM, to finnish all the validations and also activate all the plugins, one by one, and see that everyting is ok.

    Thank you again. Kind regards, :-)

  11. frankpereiro
    Member
    Posted 17 years ago #

    Ok, the atom feed had the same problem, just put a ">" at that same spot, right after the "do_action..." and that's it.

    Now, my RDF file has another error but I don't care too much about this since most people use RSS2 and ATOM to subscribe to feeds.

    Now I'll go and activate the plugins and see if everything is fine.

  12. frankpereiro
    Member
    Posted 17 years ago #

    Ok, this is the final post since I'm done doing all the testing I needed to solve this.

    Bottomline:

    1.- Check that the files have the ">" right after the "do_action..." as shown above, and

    2.- Do not use the "WPMU-Footer" plugin since it makes you have a blank first line in all of your feeds which doesn't allow you to have a valid RSS or ATOM feed.

    I will try to contact the author of the WPMU-Footer plugin to tell him/her that this plugin is causing problems to feeds.

    Greetz,

  13. drmike
    Member
    Posted 17 years ago #

    Hmm, that's weird as I'm showing a closing '>' mark on line #14 of /wp-includes/feed-rss2.php right before that channel line.

    http://trac.mu.wordpress.org/browser/trunk/wp-includes/feed-rss2.php#L14

  14. chipiik
    Member
    Posted 16 years ago #

    In my case the blank line was caused by Anti Spam Image plugin

  15. drmike
    Member
    Posted 16 years ago #

    Could be any plugin that would cause this. That and the RSS files. It's not an error that you can pin down and point at something specific.

  16. WebDesigning
    Member
    Posted 16 years ago #

    You have a lot of information in this field.

  17. ladynada
    Member
    Posted 16 years ago #

    ok frankpereiro you were right for me

    <?php do_action('rss2_ns'); ?>>

    you need that closing bracked right up on the same line. my work on a plugin helped me use your fix, because the > is there, but it was on the NEXT LINE, which is what gives you a line feed or empty line, because the code is writing to html directly in that section.

    I am working on a plugin that writes WXR files like that too.

    thanks again,
    nada

  18. dbasulto
    Member
    Posted 16 years ago #

    The Multi-user plugin Manager was adding the white space for me. Too bad, had to un install it, as i donĀ“t see why it was adding an extra space to feeds. No extra space on html...

About this Topic

  • Started 17 years ago by frankpereiro
  • Latest reply from dbasulto