RSS feeds do not validate

Posted by Community Admin on 04-Aug-2018 20:56

RSS feeds do not validate

All Replies

Posted by Community Admin on 11-May-2011 00:00

I have created a test RSS feed of the news content and it falis to validate at W3C Feed Validation

The error(s) are below:

Sorry

This feed does not validate.

  • line 1, column 1251: Missing channel element: link [help]

    ...  11 May 2011 18:43:25 Z</pubDate></item></channel></rss>
    ^

In addition, 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]

    <?xml version="1.0" encoding="utf-8"?><rss xmlns:a10="http://www.w3.org/200 ...
  • line 1, column 174: atom:name should not be blank [help]

    ... scription /><a10:contributor><a10:name> </a10:name><a10:email>sfarm@sd ...
    ^
  • line 1, column 410: Email address is missing real name (2 occurrences) [help]

    ... ws-item-2</link><author>sfarmer@sdms.org</author><title>SDMS News Item # ...
    ^
  • line 1, column 1184: description should not contain sfref attribute [help]

    ... -44de-88b9-bfd2286cf54f" /&gt;&lt;/p&gt;</description><pubDate>Wed, 11 M ...
    ^
  • line 1, column 1251: Missing atom:link with rel="self" [help]

    ...  11 May 2011 18:43:25 Z</pubDate></item></channel></rss>
    ^

Source: 74.203.179.52/.../sdmsblog

  1. <?xml version="1.0" encoding="utf-8"?><rss xmlns:a10="http://www.w3.org/2005/Atom" version="2.0"><channel><title>SDMS News</title><description /><a10:contributor><a10:name> </a10:name><a10:email>sfarmer@sdms.org</a10:email></a10:contributor><item><guid isPermaLink="false">7feacd03-1991-4e0f-98ef-3a66177bde45</guid><link>http://172.17.0.28/sdms-news/2011/05/11/sdms-news-item-2</link><author>sfarmer@sdms.org</author><title>SDMS News Item #2</title><description>&lt;p&gt;This is news item #2. &amp;nbsp;There are no pictures or links in this news item.&lt;/p&gt;</description><pubDate>Wed, 11 May 2011 19:18:15 Z</pubDate></item><item><guid isPermaLink="false">90741054-2385-49ad-95e1-7c8725cfeb17</guid><link>http://172.17.0.28/sdms-news/2011/05/11/test-news-item-1</link><author>sfarmer@sdms.org</author><title>Test News Item #1</title><description>&lt;p&gt;This is a test news item.&amp;nbsp; Click &lt;a href="http://www.sdms.org"&gt;here&lt;/a&gt;&amp;nbsp;to go to the SDMS website.&lt;/p&gt; &lt;p&gt;Here is a picture:&lt;/p&gt; &lt;p&gt;&lt;img alt src="http://172.17.0.28/images/default-album/Scout.jpg" sfref="[images]4ede72f2-cac5-44de-88b9-bfd2286cf54f" /&gt;&lt;/p&gt;</description><pubDate>Wed, 11 May 2011 18:43:25 Z</pubDate></item></channel></rss>

The feed does work in most readers however it does crash an iPhone app which we want to eventually feed using the sitefinity news content.  Can we manually fix the errors above or will this need to be included in the next bug fix.

Thank you

Posted by Community Admin on 16-May-2011 00:00

Hi Scott Farmer,


If you want manually to change the output you have to  inherit SyndicationPipe and override FormatOutputData. The method have to return SyndicationFeedFormatter. We are using  Atom10FeedFormatter or Rss20FeedFormatter  which comes with .NET framework.  After that you have to execute this code :

Copy Code
PipeFactory.UnregisterPipe("RSS" );
  PipeFactory.RegisterPipeType("RSS", typeof(YourSyndicationPipeType));

every time  when the sitefinity starts, so you can use Global.asax, Application_Start.

All the best,
Teodor
the Telerik team
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 04-May-2012 00:00

UPDATE:

As the PipeFactory class is marked as obsolete (will be removed in Sitefinity 5.1) and it is replaced by the Telerik.Sitefinity.Publishing.PublishingSystemFactory class, the following code could be used instead:

using System;
using System.ServiceModel.Syndication;
 
using Telerik.Sitefinity.Abstractions;
using Telerik.Sitefinity.Publishing;
using Telerik.Sitefinity.Publishing.Pipes;
 
namespace SitefinityWebApp
    public class Global : System.Web.HttpApplication
    
        protected void Application_Start(object sender, EventArgs e)
        
            Bootstrapper.Initialized += Bootstrapper_Initialized;
        
 
        void Bootstrapper_Initialized(object sender, Telerik.Sitefinity.Data.ExecutedEventArgs e)
        
            if (e.CommandName == "Bootstrapped")
            
                PublishingSystemFactory.UnregisterPipe(RSSOutboundPipe.PipeName);
                PublishingSystemFactory.RegisterPipe(RSSOutboundPipe.PipeName, typeof(CustomFormatRssOutboundPipe));
            
        
 
        public class CustomFormatRssOutboundPipe : RSSOutboundPipe
        
            protected override SyndicationFeedFormatter CreateFeedFormatter(SyndicationFeed feed)
            
                var formatter = base.CreateFeedFormatter(feed);
 
                var rssFormatter = formatter as Rss20FeedFormatter;
                if (rssFormatter != null)
                    rssFormatter.SerializeExtensionsAsAtom = false;
 
                return formatter;
            
        
    


All the best,
R. Atanasov
the Telerik team
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

This thread is closed