ASPX templates
Version 5.x > ASPX templates > XmlDataSource RSS Problems View modes: 
User avatar
Member
Member
Blake - 5/11/2011 1:24:38 PM
   
XmlDataSource RSS Problems
Running Version: 5.5 R2 Build: 5.5.4147

In a template, I'm trying to implement an XMLDataSource connected with a basic repeater and having issues.

The basic repeater I have:
<uc1:basicrepeater ID="rptNews" ZeroRowsText="Nothing Found" runat="server" DataSourceName="dataADA" TransformationName="Custom.Transformations.NewsItem" HeaderTransformationName="Custom.Transformations.NewsHeader" FooterTransformationName="Custom.Transformations.NewsFooter" HideControlForZeroRows="false"/>


The XMLDataSource is setup like so:
<cms:XMLDataSource ID="dataADA" TableName="News" runat="server" XmlUrl="http://www.ada.org/news.xml" />


The RSS feed is found here and has data in it.

The page only loads and displays "Nothing Found". Am I missing something obvious that I need to add, or is there a way to debug the XMDataSource further to see if it's loading anything at all?

User avatar
Kentico Support
Kentico Support
kentico_zdenekc - 5/17/2011 9:26:54 AM
   
RE:XmlDataSource RSS Problems
Hi Blake,

As discussed with Michal via emails, there were some conclusions about problem in RSSRepeater and suggested workaround with specifying DataSourceControl property instead of DataSourceName (which doesn't seem to be working properly in ASPX templates), however I still want to make sure what's exactly your aim.

I believe you want to display the list of news from ada.org RSS as normal list of items on the page, is that correct?

For this, you would just need to correctly set "Table name" property in the XMLDataSource webpart. In case of standard RSS feeds eqqual to "item". I'm describing it in this thread.

However, the problem here might be also related to the colon in tag name (e.g. <atom:link...>), which was fixed in recent hotfix release.

Please let us know what have you found and if my assumption matches your aim.

Regards,
Zdenek

User avatar
Member
Member
Blake - 5/31/2011 12:57:13 PM
   
RE:XmlDataSource RSS Problems
I believe you want to display the list of news from ada.org RSS as normal list of items on the page, is that correct?


Yes, we had some back and forth and I probably didn't explain that well, as he wanted me to use the RSS Repeater for output.

I did figure out the Table Name to Item after my initial post, but it was the bug with DataSourceName which is still an issue as far as I know. Once we figured that out the work-around for setting the DataSourceControl within the code-behind, and I used just a basic repeater, it started working as desired:


Page:
<cms:XMLDataSource ID="ADANewsXMLDataSource" runat="server" TableName="item" XmlUrl="http://www.ada.org/news.xml" XmlSchemaUrl="http://www.thearchitect.co.uk/schemas/rss-2_0.xsd" />
<uc1:basicrepeater ID="rptNews" runat="server" TransformationName="custom.RSS.NewsItem" HideControlForZeroRows="false" ZeroRowsText="Nothing found" DataSourceControl="ADANewsXMLDataSource"/>

Code-behind:
protected void Page_Load(object sender, EventArgs e)
{
rptNews.DataSourceControl = ADANewsXMLDataSource;
}

User avatar
Kentico Support
Kentico Support
kentico_zdenekc - 6/1/2011 8:35:51 AM
   
RE:XmlDataSource RSS Problems
Hi Blake,

Thanks for your feedback and information about a workaround that works for you.

As for the mentioned bug, the latest conclusion I got is that it's not considered as a bug. When you don't set FilterName property, it won't work. With this property the Datasource is registered in the system and the Repeater can load data from it.
If this isn't described and apparent in documentation, it should be improved...

Please let me know if you need any further help with this. Thanks.

--Zdenek