Feed Validation Woes with WordPress

GAH! Feeds not validating in FeedValidator! Feed URL incorrectly listed in syndic8, with no way to change! WP-Cache playing havoc with non-HTML source PHP, and CPU loads are still too high on the server! Techy Notes and bitching follow…you’ve been warned!

So I go and install another new version of Gallir’s WP-Cache plugin, and I still have the feed caching problems. I look for a way to disable caching of the feed URLs.

Ordinarily, you’d think you’d want to cache the feeds, but WP-Cache2 isn’t smart enough to not prepend the text/html; charset="utf-8 media type to the output of the feed-generating PHP. This media type is needed for serving the cached HTML (an http protocol requirement I think), but it’s a no-no for feeds, which are expected to be free of that stuff. Feed provide pure XML or custom markup. I just discovered this fact using the Feed Validator.

The solution, which I got from the comments section on Gallir’s site, is to add feed/ to the list of rejected URIs. I had before removed the wp-atom.php, wp-rss.php, etc. from the list of “accepted files”. You’d think that would work, but since I’m using the .htaccess file to tell mod-rewrite to handle the feed urls, WP-Cache actually never sees references to wp-atom.php.

In other words, there are multiple URLs for the feeds, and you need to tell WP-Cache how to ignore all of them. The main mechanism for pointing various URLs to the feeds is using the RewriteRule in .htaccess, so you need to be aware that it’s the actual URL that WP-Cache is going to base its caching action on, not the actual PHP files.

So yeah, this isn’t ideal, but at least the RSS feed validates now. The Atom feed is still not validating. What still worries me is the CPU load from PHP-Markdown coming back to knock my site offline once again. Especially since I’ve just submitted my site to a bunch of blog agregators. I may have to re-enable caching and let that media type screw with the readers anyway, or I can modify WP-Cache so it is smarter about those particular files.

This syndication stuff is such a mess…I find the whole situation very irking. Though, I ignore these issues myself in Lazy Image Layout, so I am hardly qualified to point fingers.

And while I’m at it, I still can’t figure out how to correct the feed URL for my syndic8 listing, which is pointing to a very old (and broken) feed URL. So I submitted a new feed URL, and it’s created a whole new entry in their system. Sigh. :http://www.syndic8.com/feedinfo.php?FeedID=187206 The broken syndic8 listing has stalled my experiments with [blogshares], which still hasn’t indexed of my site because of the aforementioned broken feed URL. I didn’t realize it was busted until I realized the URL was actually invalid. The status page just said “polling”, not “invalid”. So I just added another RewriteRule to my .htaccess file to point it to a working URL, and hopefully this will clear things up.