Views 2 RSS Feed in Drupal 6

 

Ever tried to make an RSS feed for a custom view using Views 2 and Drupal 6? It's not that intuitive, and you get a lot of scary error messages!

Fortunately, most of these can be safely ignored. An archive post on Drupal.org details how to do this, and get past the nasty error messages like "Row style:Missing style plugin."

RSS XML Errors

After I got my feed up and running, I started getting an error when viewing it. Chrome gave this error:

This page contains the following errors:

error on line 2 at column 8: XML declaration allowed only at the start of the document

Below is a rendering of the page up to the first error.

Looking at the source, everything seemed fine, except the first line of the XML document was:

<span id="thmr_417" class="thmr_call">

Okay, that's bad. Why is there a span tag in my XML document?

I finally found the culprit: the Devel module. I had enabled both Devel and Theme Developer, which insert span tags around the HTML/XML output. Once you disable the Devel module, the span tag goes away.

Happy RSS'ing everbody!

Did you enjoy this post? Please spread the word.