You are hereBlogs / dave's blog / Views 2 RSS Feed in Drupal 6

Views 2 RSS Feed in Drupal 6


By dave - Posted on 12 August 2009

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!

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

About the Author

dave's picture

Name
Dave Nugent

Bio

Dave is a freelance Drupal developer working in the San Francisco bay area. He recently graduated from Carnegie Mellon University Silicon Valley. In his spare time he docents at the Computer History Museum. Follow Dave on Twitter @drnugent.