Wednesday, December 24, 2008
How to Find the RSS Version of Your Feed
(Mission, KS) --- Ok, lets talk about some basics. In the best of all worlds, when you setup a newsfeed using the DNN News Feeds (RSS) module, there should be a display of basic RSS feed info to help you understand the type of feed you have, in case you have to troubleshoot it. Now, for the real world. The module only gives you an error message when setting up the feed after you've set it up, and the feed is accessed. If a feed has trouble, you usually, just get an error message - ya, know the one 'Download Error'. Of course, this gives you nothing to go on. What's up? What can you do to investigate and fix the problem? Well, in my real world, I take these approach.
Let's start from square one...
1) Always, use a browser first to check a newsfeed for accessibility, and to determine what version of RSS is being used. You'll save yourself a lot of time, if you take this fist step before setting it up in DNN. I know you shouldn't have to do this type of thing, but believe me, this is the real world side of RSS syndication, not just DNN news syndication presentation.
If you can't get the feed to display in your browser, it has no chance of displaying in DNN, because the module code basically does a download of the feed in a similar manner, though there are some differences behind the scenes.
2) Next, examine the feed news source by using your browser's 'View Source' feature'. The way to do it, depends on the browser being used, though. Using MS IE, just right click while on the content of the page, and your default text editor will display the info. Using FireFox, right click and choose 'View Page Source'. In both these scenarios, the display of the source will largely be unformatted and difficult to decipher. I select all of the text and copy it. Then, I paste it into either my prefferred text editor, PFE32, or in Xselerator (both indespensible tools). With xslerator, I can use the 'tidy' button to display the feed in better fashion.
3) I examine the source looking at the xml tag that defines the RSS version, and has information about any custom namespaces that may be used in to define tags beyond the default RSS version tags. This part is extremely importand when troubleshooting DNN RSS news module setups. The information of interest looks something like this example:
<?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'>
In the example, we see that the feed is an RSS Atom v1.0 feed and uses a custom namespace defined in the Atom namespace.
Another example, this one is from USAToday, and it says it's an RSS v2.0. Note there are 2 custom namespaces used in the feed. One signals it is an RSS v2.0 Feedburner type of feed, and the other calls Microsoft's custom namespace cf. Both, types of namespaces will have tags that are not used in the DNN News Feeds (RSS) module. Although, both are available for use and are syntactically correct.
<?xml version="1.0" encoding="UTF-8"?><rss
xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" xmlns:cf="http://www.microsoft.com/schemas/rss/core/2005" version="2.0">
Lastly, though not finally, as there many varieties of news feeds, is the OPML feed. This type of feed is really just a directory style listing of links assembled using the OPML spec, which is a fancy type of XML, as are all newsfeeds. Note, this spec hasn't changed much since it was introduced.
<?xml version="1.0" encoding="UTF-8" ?>
<opml version="1.1">
The above are the 3 most likely types of newsfeeds you'll encounter, although each has a variety of flavors depending on the news source provider. All of these basic types of news feeds are supposed to be supported with the new DNN news module, but there are a lot of gotchas along the way. I'll blog about those in another entry.
4) Again, while using Xselerator, I pull in the default xsl file from DNN, and use the 'green arrow' to translate the feed using the xsl. Now, if all is well, then the feed will display, provided I've set up the necessary paramters for the example with the DNN params used in the RSS module. If the feed does not work, it isn't going to display in DNN, but you're not done. The sad fact is - it may still fail after setting it up in DNN giving you a download error, due to a variety of problems. Notwithstanding, incorrect formatting, missing attributes, or the RSS version is not supported.
5) Validate your news feed source. A newfeed validation service allows you to get a better idea of what kind of errors are being encountered. Most feeds you encounter are going to be either RSS flavored or Atom flavored, and the validation service I find most useful is the W3C Feed Validation Service, for Atom and RSS. This is a very important step, as DNN is going to be more strict about newsfeeds following specifications, even though their internal implementation that generates newsfeed doesn't alway comply either. Strange huh!.
Keep in mind that browsers are a lot more forgiving when they present newsfeeds, and that really has to do more with the differences in a browser application and a web framework like DNN. The browsers are more capable of sanitizing and converting newsfeeds into an acceptable presentation. Why? Well, it's a difficult task to judge a newsfeed's implementation.
The biggest problem with DNN's latest module is attempting to allow aggregation of newsfeeds that use different formats. The idea was interesting, but unfortunately, the process is much too failure prone to be useful. My feeling is that the DNN News Feed (RSS) module needs to forget about being an aggregator altogether, or at least allow only similar formatted newsfeeds sources in any one aggregation. Prior to the latest module's introduction, a very workable aggregator was available with the News Explorer module. Unfortunately, now this is broken.
Now, I know this is a bare bones approach without much in the way of a tutorial, but I don't have a lot of time today, so if you're interested in knowing more, leave a comment, and I'll expand on the topic.
Look for a 'Useful Developer Tools' Blog entry for short descriptions and links to developer tools I use, and why.
Thursday, December 11, 2008
Feed Explorer Broken...
(Mission, KS) --- I've been using the Feed Explorer module for a bit, so I'm ok with how to set it up and some of the nuances and other tricks using it. However, while investigating an issue for someone else, I've found that there is a problem with it. The Feed Explorer module seems to be busted in v04.09.00 and in v.05.00 rc. I lose the tabs whenever I change the settings for the Feed Explorer's Content Source option. I have to delete the module and recreate it to see them again. Further, this means that I cannot use it for anything other than the default configuration, which is - how do I say it? Very Bogus.
So, it would be helpful to have a Forum for this module, since it is a seperate module, and one that comes with the default setup of DNN. BTW, does anyone else see the same thing in their dnn v04.09.00 and up installs? Losing tabs and inability to configure the module without breaking it.
I did not notice this issue for so long, mainly because I've been so focused on the new release of the News module. Unfortunately, my preference at this stage is to use the Feed Explorer module for situations where I need to aggregate feeds, because I don't like the way that the News modules does it. Now, with this latest issue, I can't use it for DNN sites using versions above v04.06. Hope we can get it fixed soon.
Monday, December 1, 2008
How To Get Help on the DNN Forums
- (Mission, KS) I know this may sound trivial, but the question gets asked many times, so I thought, it would be worthwhile to revisit the approach I find works best for me. Hope it works for you too!
1. Search for a key phrase. There may be an answer to your issue already out in the ether-land. Try using your favorite search engine and enter a key phrase or keywords to check for other posts or information. Not all hits apply to your specific issue, but it gives a head start on how to zero in on a solution. You just may find a resource that can help, or that your issue is already answered, which means you don't have to duplicate it on the official DNN forums.
2. Include Environment Specifics. It's extremely helpful to those anwering posts for help to know the environment details when you encounter an issue. For example, include the following:
- DNN version
- Operating System (i.e. XP Pro, Server 2003, or whatever you are using)
- Database Info - SQL2005, SQLExpress or whatever.
- Hosted or Non-hosted setup. Is this a test private setup or hosted by an outside vendor?
- Module versions. It really helps to know the module version being used.
- Brief error description, doesn't have to be everything that is dumped to the screen, just the meat without the fat.
3 Keep posts friendly. The DNN forums is not a profit-organization, it's maintained by volunteers, and most often the folks answering are willing to help, and are not getting paid. The folks that respond do so because they are committed to the project.
4. Review Existing Posts and Bug Issues. A lot of issues are tracked in the official bug tracker or can be seen as items on a project's road map. While it may take time to go through the posts, it doesn't help to duplicate posts with reporting similar issues. Duplicates only add to the number of posts others have to review. Again, responders tend to want to answer once, and expect folks to look for the help already offerred.
5. Pay It Forward. If you can help answer a post question, do so. Remember it's a community. Give your expertise to further the project.
6. Be Patient. Responders have their priorities as well. Understand folks will help, but it may take some time to duplicate and test the issue you report.
7. Keep On Subject. Resist the urge to hijack a thread with non-relevant comments. If you have positive responses to aid in the solution, add the information, otherwise, keep it real.
8. Say When. If your issue is resolved, say so, and mark the issue answered. Always give thanks to the folks that helped, they will appreciate it.
Saturday, November 8, 2008
Why No Standard DNN Module RSS Generator?
(Mission, KS) - Ok, I'm bringing up a old can of worms, I admit straight away, but it's a topic that really gives me a royal pain in the a**. Of all the support questions I get about DNN and news feeds the one that seems to always at the top of the list: 'Why does the newsfeed module fail to render my site's syndicated content?' Well, the answer depends on which module you are using and how the syndicated content is generated.
A long time ago, in a far-away galaxy, I was a member of the DNN Core Team, and ever so briefly was the News Feeds (RSS) project's Team Leader. In that capacity, one of the first assignments I tackled was to begin the process of improving the internal RSS syndication methods. Now, the difficulty here was that the syndication process is tied to the internal search mechanism, which we all know by now, is constantly changing, and seems to never work the way you would suppose it to work. That being said, I could only address the internal process in a very controlled and limited way. I could improve certain aspects, but adding needed features, including the use of custom namespaces was vetoed. The wisdom of the sages was at a point in DNN evolution that wanted to delay these efforts as not to 'break' anything that would negatively impact the spread of DNN to bigger and larger stakeholders. It was probably a wise choice not to let some newbie upstart impact such a central area of DNN.
Now, the ages pass, and DNN is firmly established as a well known and well received entity among the large and respected houses of the Internet applications world. Maybe, it's time to wonder about why there is no standard RSS syndication generation API that is required by all DNN projects. Some projects have gone their own way with generating syndicated content for their projects, while others just use the in-bred methods. Which is best? In a word, neither!
The losers in all of this patchwork of syndication generation is the DNN community at large, who probably don't even realize that the ability to transform and present syndicated content varies with which module and version is being used. Of course, this most often shows up when the poor RSS Newsfeeds (RSS) module is being used by folks expecting things to work correctly out of the box. Sorry Virginia, but the DNN Santa Claus is not well and won't be addressing your needs in this version! There simply is no guarantee that the default news module will present your DNN site's syndicated content. In fact, even so-called improved custom RSS generators contained in some project modules do not even adhere to the syndicated format specs they supposedly follow.
Just like other non-DNN syndicated content, the appearance of a a specs version in the feed does not always guarantee that the spec used is faithfully followed. Elements like dates, author, and others my not follow the spec used and it's up to the consumer or their application to make provision for any errors in syndication. Pretty terrible situation. Imagine if you had the same lack of conformity with the automobile manufactures.
I come from the old school that requires no negative opposition to existing methods and procedures without presenting plausible alternate solutions. So, here's my plausible alternative.
DNN should commit to syndication method that holds developers to using it. In the simpliest transition possible, there could be at minimum, an indentification tag added to their custom methods that indicate which rss generator is being used. In RSS specs there exists an optional channel element tag 'generator', which can effectively identify at bare minimum something like this:
or
Inclusion of this information would at least help those who provide 'FREE' support for the benefit of the DNN community a way to quickly troubleshoot the issues being reported daily. Some of us do support and help the DNN community because we believe in the open source project. Can't the DNN Core Team and DNN Corporate members take this small step? We will see.
I'm not even going to go into what improvements in the internal syndication methods are needed, but would love to provide my views sometime when someone is actually going to listen.
Wednesday, November 5, 2008
Forward to the Past
(Mission, KS) - Well, just a quick note to let folks know that my old fix to the News module actually does work. I can display Atom feeds with my modified News module. Unfortunately, my mod works with the v4.0.0 module, but not the new v4.0.1 version. I'm still trying to understand why. More later, as I step through the code.
Tuesday, November 4, 2008
News v4.0.1 Not Rendering Atom Feeds...
(Mission, KS) - Had some time to play around with the new release of the News Module. Unfortunately, this release will not render Atom feeds, at least the many that I tried. I'm getting the all-too-familiar 'failed to download' error.
Just wanted to post about it here, and I'll have to look into the code more. Even the 'fix' I had made prior to this release does not help, so I'm lost at this point as to what the duece is going on.
Ah, well, I'll get to it, in the morning...
Monday, November 3, 2008
Updated News Module Released...
(Mission, KS) -The update to the News module was released. The new version v04.00.01 fixes some of the reported issues with the initial release.
- Add accept and user agent for web request
- Remove email address constraints
- Add option to not use Ajax rendering in module settings
- Reorganized and rewritten Javascript to allow rendering of multiple News modules on a single page in Ajax mode
- Fix for XHTML issue (div ending with span)
However, you should note that while several issues were fixed, many others persist. Including support of non-standard pubDates, and transformation of Atom feeds. Some will find that their feed still will not download.
The option pending review of these issues and subsequent fixes is to use the XML/XSL module with a custom XSL. This option is not welcome news for novice users, who are inexperienced in writing their own custom xsl transformations.
More on this release as more folks post their issues. My own issue is that the Atom feed for this very blog cannot be rendered by the latest DNN News module. During testing I found some issues with with DNN's method of 'sanitizing and transforming' Atom feeds into RSSv2.0 DNN specific format. I've fixed the issue in my code, but since the release was 'in the tracker' this fix could not be added to the update. That's a sad reality of the way things move in the development world. I didn't have the source to the v04.00.01, so I could not confirm that the issue persisted in that version until today.
Ah, well, all in due time I suppose. Meantime, I'm fixing it in the latest version and will submit it to Peter for review and hopefully inclusion in the next release.
As always, please test any new release in a non-production area. You'll be glad you did.
