Error: CQWP – RSS feed of non-documents doesn't work

This is a pretty weird error. I was doing content roll-up of Announcements lists, to give a unified news channel for our intranet. Naturally, I decided to do this using the Content Query Web Part. I added one, and selected that I wanted to query for the contents of Announcements lists. As I like RSS feeds, I enabled one, and I added it to my favorite feed-reader.

It worked – but the links to the announcements themselves didn’t work. The short summary is that is that it appears RSS feeds from Content Query Web Parts don’t work when you query for certain types of list.

What I realised was that there was no server in the URL, so my feed reader’s link to the item was going to a URL starting:

http://_layouts/CopyUtil.aspx?Use=id&Action=dispform ...

I’m now tempted to register the _layouts domain ;p

Anyway, checking in the RSS source showed links to incomplete URLs:

Hmm. So how to fix it? I did some Googling and found references to similar URLs, and the solution seemed to be to modify the ContentQueryMain.xslt file (found in the Style Library > XSL Style Sheets). I couldn’t see why this should make a difference – it’s not to do with the RSS feed – but I thought I’d try just incase I’d misunderstood.

I hadn’t. It didn’t work.

I then wondered if the RSS feed worked for a new Content Query Web Part that had just been added to a page. I added one, and enabled the RSS feed. It did work – the URLs in the links contained the server.


I exported both web parts as XML and differenced them. One thing I noticed was that the UseCopyUtil setting was false in the working web part, and true in the one that wasn’t. I changed this to true, imported the web part, and now the URLs had a server at the start. They weren’t valid URLs still, so I swapped back.

Next, I wondered what would happen if I took the web part with the working RSS feed, and slowly changed it over to the query I wanted to run. Presumably, at some point it would break.

It did. When I selected that I wanted to query for Items in an Announcement list rather than a Pages library. I changed my query back to Pages – and the RSS feed worked. I tried changing to query for Document libraries – and the RSS feed worked. Then I tried changing the query to get items from Discussions lists – and the RSS feed failed again.

I then took a look at the page being used for the RSS feed (feed.aspx). All it was really doing was inheriting from the Microsoft.SharePoint.Publishing.Internal.CodeBehind.FeedPage page class. I broke out Reflector, and tried following what was going on inside, but to be honest, it was too complicated, and I couldn’t be bothered.

Either way, it looks like the Content Query Web Part’s RSS feed doesn’t work if you’re querying for Announcement lists.

Error: CQWP – RSS feed of non-documents doesn't work

2 thoughts on “Error: CQWP – RSS feed of non-documents doesn't work

  1. Rahul says:

    Hi Andy,

    I saw your wite up on the RSS.
    I have a similar issue but I am able to get the RSS feeds for announcement.
    What I did was I have acontent type that is derived form announcement + my custom fields.

    So i see the CQWP spitting out RSS item records just the way I thought it.
    Click on the RSS sysmbol just shows me what i want.

    But when I wrote a user control to show the rSS feed with some javascript i saw that there were some records in the feed that were showing only for a particular site, as if it looks like a sticky session,
    So i waited and hit refresh couple of time after 15 – 20 minutes I saw I got the original result , records from multiple sites (The way i wanted), and then after
    30 minutes i again saw that I was getting the results from one particular site.
    This toggle behviour is happening for almost 3 days after every 15 – 20 mintues.
    I am wondering what’s causing that.

    I thought may be the user control is caching but obviously toggling is a behavior i cant expect user control to be the culprit.
    So i opened another window in teh browser and paster the url that the rss gives me to spit out raw xml. Same effect (toggling behavior continues in IE as well)

    Could you please provide me some insight.


  2. Hi Rahul,

    Sorry, that’s a behaviour I’ve never seen.

    You’re right that there is a cache, so the waiting for the items to appear makes sense. But the ‘toggling’ is weird – I’ve not heard of that.

    Does the toggling happen if you’re just using the CQWP itself? (I think that you were describing the answer ‘yes’ in your final paragraph.) If so, that is really weird.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.