April 2011 Archives

RSS feeds and Roxen CMS

Some University organizations with sites in both Roxen CMS and blogs.princeton.edu have tried to use Roxen’s RSS component to pull in the latest headlines from their blogs.

This scenario has two obstacles:

  1. The limitations of our current load balancer
  2. The default template format of Movable Type blogs (Atom versus RSS)

The Load Balancer

Both systems use our load-balancing environment, and a huge shortcoming of that environment is that when one load-balanced URL tries to communicate with another load balanced URL, that attempt fails. For example, let us assume that you are trying to add the following RSS feed to your Roxen CMS site:
http://blogs.princeton.edu/main/index.xml

This attempt works great on the www-dept-edit (deptaedit, deptbedit, etc) site, but fails when you preview the feed at your www.princeton.edu url. The “www” url is load-balanced, the others are not.

The workaround is to, instead, use the non-load-balanced URL as the source for your feed. In most cases, that would just be blogs-01, making the feed URL:
http://blogs-01.princeton.edu/main/index.xml

Atom versus RSS

The parser for the Roxen RSS component does not support Atom feeds. The default templates in Movable Type 4 omitted an output template for an RSS feed, believing Atom to be the superior feed format, and they only included an Atom feed template.

To rectify this, go to the admin interface for your MT blog, navigate to Design → Templates. Click on “Create index template.” Name your new template something like “RSS Feed,” and paste the template code from the following page into the large form field:
http://www.movabletype.org/default_templates/4.2/rss.mtml

Under Template Options, in the Output File field, type index.xml or rss.xml (anything with a .xml extension would work). Leave the other fields with their default settings. You can leave the Template Type set to “Custom Index Template.” Then click Save, wait, and then click Save & Publish.