3

I have the Weblog module installed on my site. I am now on sitecore 8.1 Update 2. Rss Feeds used to work well with old versions of sitecore. Not sure why it isn't working now.

I used the following site to validate my feed and it is giving me the following errors:

1- This feed is valid, but interoperability with the widest range of feed readers could be improved by implementing the following recommendations. line 1, column 0: Avoid Namespace Prefix: a10 [help]

2- line 1, column 14721: Missing atom:link with rel="self" [help] ... Nov 2014 14:30:02 -0600

Any idea where I can fix those errors in the RSS feed, or should I update something or write a specific class to overwrite the current one?

Your reply is kindly appreciated.. Thanks!

3

WeBlog utilize standard RSS feed functionality delivered by Sitecore.

Take a look at the RSS feed item and its template: /sitecore/templates/System/Feeds/RSS Feed

RSS Feed template uses default Feed Delivery Layout (/sitecore/layout/Layouts/System/Feed Delivery Layout)

You can find it in your website root: /sitecore/shell/Applications/Feeds/Layouts/FeedDeliveryLayout.aspx

When you open it there is nothing special there:

<%@ Page Language="c#" Inherits="Sitecore.Syndication.Web.FeedDeliveryLayout, Sitecore.Kernel" CodePage="65001" %>
<meta http-equiv="X-Frame-Options" content="SAMEORIGIN">

If you feel you need to overwrite something this is the way to go.

You can write your own implementation of

Sitecore.Syndication.Web.FeedDeliveryLayout, Sitecore.Kernel

class and edit the FeedDeliveryLayout.aspx file or create your custom Layout with your own implementation which is more elegant.

Edit:

TL;DR: I think you are using wrong validator

Are you sure that content returned by RSS Layout is different than previously?

I don't think that anything changed in Sitecore code. I compared code of following classes, used to generate RSS (8.1.0.0 vs 6.0.0.0)

  • FeedDeliveryLayout.cs
  • FeedManager.cs

No changes.

I think that right now your are trying to validate your feed as Atom feed. (Atom feed and RSS feed are different formats).

Sitecore code:

public static string Render(SyndicationFeed feed)
{
    Assert.IsNotNull((object) feed, "feed");
    StringWriter stringWriter = new StringWriter();
    XmlWriter writer = (XmlWriter) new XmlTextWriter((TextWriter) stringWriter);
    feed.GetRss20Formatter().WriteTo(writer);
    return stringWriter.ToString();
}

As you can see Sitecore use:

GetRss20Formatter

Rss20FeedFormatter Class

A class that serializes a SyndicationFeed instance to and from RSS 2.0 format.

Validation warnings are for Atom.

You can find out more here: https://msdn.microsoft.com/en-us/library/system.servicemodel.syndication.syndicationfeed.aspx#Examples

If you really want to switch to Atom format, then writing your own Feed Layout is the only one way

3
  • I saw that Weblog is using the functionality delivered by Sitecore, and it was working well before on previous versions in sitecore. I was wondering if something got updated on the RSS that made it not valid now. – joanelaydi Oct 24 '16 at 11:18
  • Do you have any idea on this? – joanelaydi Oct 24 '16 at 11:19
  • @joanelaydi I updated my answer with additional information. – Alan Płócieniak Oct 24 '16 at 21:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.