WordPress.org

Ready to get started?Download WordPress

Forums

Validation Warning: Non-Atom feeds should not be served? (7 posts)

  1. korereactor
    Member
    Posted 9 years ago #

    After making no changes whatsoever to my blog or feed, suddenly, I'm getting this message when validating my ATOM feed:

    Non-Atom feeds should not be served with the "application/atom+xml" media type

    Anyone have any ideas as to what happened? Did someone change or update the validator, or has my provider done something to Apache? Any help would really be appreciated, as this is a mystery to me, as it validated fine yesterday. Note: My RSS feed still validates OK.

  2. Kafkaesqui

    Posted 9 years ago #

    Looks like a bug in the way WP handles the summary text through the_excerpt_rss(). A simple fix would be to edit wp-atom.php (blog root), and where it says:

    <summary type="text/plain" mode="escaped"><![CDATA[<?php the_excerpt_rss(); ?>]]></summary>

    Change it to:

    <summary type="text/html" mode="escaped"><![CDATA[<?php the_excerpt_rss(); ?>]]></summary>

    You'll still get a warning about non-Atom feeds (???), but the feed will validate.

    EDIT: It's been reported previously:

    http://trac.wordpress.org/ticket/1440

  3. Yes, and that bug report was closed because Matt has "confirmed" that it works fine for him. ...Even though I can reproduce the bug on all of my v1.5.1.3 blogs. Go figure...

  4. Kafkaesqui

    Posted 9 years ago #

    The problem is the_excerpt_rss() does not strip HTML from the excerpt/content, so using text/plain is incorrect (read: invalid) for a summary element when HTML comes through. I'll see about reporting this again in more depth in the bug database.

    I'm not sure why the non-Atom feed warning occurs, even after this is adjusted.

    EDIT: Uh, actually you can ignore most of this reply. I'm a little under the weather today, and misspoke (was thinking of another tag).

  5. Kafkaesqui

    Posted 9 years ago #

    My solution above does NOT fix anything for OP (except in my own fevered imaginings). I'm still not sure the cause for the warning, but Atom feeds appear to still validate (scrolling to the end of the Feed Validator's results page shows this). It would be interesting to track down if the warning is some problem in the Atom script, or in FV's validation methodology.

  6. korereactor
    Member
    Posted 9 years ago #

    Actually, when I scroll down it did indeed validate. I just didn't think to scroll down. It would be nice to rid the warning message, but I can live with it for now...

  7. dedge
    Member
    Posted 9 years ago #

    Yep, I've been seeing this "warning, this feed is valid but..." message for Atom validation as well. I had already tweaked for the excerpt plain vs html issue and was getting good validation as recently as a few days ago. I'm thinking the validator was changed somehow as part of the 0.3 to 1.0 spec.

Topic Closed

This topic has been closed to new replies.

About this Topic