typo icon

Typo Upgrade: 2.6.0 to 4.0.0 r1188

Posted in Wed, 02 Aug 2006 23:32:00 GMT

I finally got around to upgrading Typo here to the latest trunk. At first I was waiting to upgrade to 4.0.0 (officially r1161) but decided to move to SVN after hearing about some post-r1161 bugfixes and it seems like a fairly common practice to run off SVN, at least for Typo. I've hacked a few changes onto 2.6.0 and had to manually merge the mods to r1181. Merging one's own mods to the trunk was discussed today on the Typo mailing list under the heading "Version Controling Modifications" and most of the respondents have their own mods and use Chia-Liang Kao's SVK to keep their mods synced with the trunk. Scott Laird has a number of articles on using SVK with Typo's repo. Seems like running off of the trunk with SVK may be a best practice for Typo installations.

Hopefully I'll be on SVK for my next upgrade since I had to manually update the following files this time around:

  • app/controllers/articles_controller.rb
  • app/helpers/application_helper.rb
  • app/helpers/articles_helper.rb
  • app/views/articles/_article.rhtml
  • app/views/articles/_articles_toc.rhtml
  • app/views/articles/index.rhtml
  • app/views/articles/read.rhtml
  • components/plugins/sidebars/category/content.rhtml
  • components/plugins/sidebars/xml/content.rhtml
  • config/routes.rb
  • themes/azure/layouts/default.rhtml

I've moved all my Azure theme changes to a custom theme so the changes are easier to keep track of and don't interfere with the base Azure theme.

I've updated my Installing Typo article to cover SVN checkout, Feedburner customization and rake migrate. The Typo TOC How-to has also been updated for 4.0.0.

While code diving, I was happy to see lots of refactoring though the code is still pretty easy to follow and modify. Hopefully soon I'll be back to hacking more enhancements. I'm particularly interested in extending the sidebar functionality so groups of plugins can be positioned in multiple locations on the page, e.g. a 3-col layout.

Upgrade Gotchas

  • UPDATE: this section on Feed URIs seems to be inaccurate because I chose to use my old 2.6.0 routes.rb file. I didn't think the feed URIs would change. New approach: don't assume anything has stayed the same and move to svk.
    Feed URIs: Typo 4.0.0 changes the feed URIs from 2.6.0 so if you have these URIs registered somewhere, e.g. Feedburner or LiveJournal, you'll need to upgrade your URIs. The new URI styles are:
    • http://www.dev411.com/blog/xml/feed/feed.xml?type=feed&format=atom
    • http://www.dev411.com/blog/xml/feed/feed.xml?type=feed&format=rss20
    For comparison, the 2.6.0 style is:
    • http://www.dev411.com/blog/xml/rss/feed.xml
    Everytime this URI changes I need to file a support ticket at LiveJournal whereas on Feedburner I can change the URI myself. I've been wondering if I should just have LiveJournal use the Feedburner URI ;)
  • Categories sidebar no longer alphabetized: My categories list was no longer alphabetized so I edited the components/plugins/sidebars/category/content.rhtml page from:
    <% for category in @categories -%>
    <% for category in @categories.sort {|a,b| a.name <=> b.name} -%>
  • config no longer used in ArticlesController: If you used config, the code needs to be changed like this example:
del.icio.us:Typo Upgrade: 2.6.0 to 4.0.0 r1188 digg:Typo Upgrade: 2.6.0 to 4.0.0 r1188 reddit:Typo Upgrade: 2.6.0 to 4.0.0 r1188 spurl:Typo Upgrade: 2.6.0 to 4.0.0 r1188 wists:Typo Upgrade: 2.6.0 to 4.0.0 r1188 simpy:Typo Upgrade: 2.6.0 to 4.0.0 r1188 newsvine:Typo Upgrade: 2.6.0 to 4.0.0 r1188 blinklist:Typo Upgrade: 2.6.0 to 4.0.0 r1188 furl:Typo Upgrade: 2.6.0 to 4.0.0 r1188 fark:Typo Upgrade: 2.6.0 to 4.0.0 r1188 blogmarks:Typo Upgrade: 2.6.0 to 4.0.0 r1188 Y!:Typo Upgrade: 2.6.0 to 4.0.0 r1188 smarking:Typo Upgrade: 2.6.0 to 4.0.0 r1188 magnolia:Typo Upgrade: 2.6.0 to 4.0.0 r1188 segnalo:Typo Upgrade: 2.6.0 to 4.0.0 r1188



  1. Scott Laird said 7 days later:

    If you’re seeing http://www.dev411.com/blog/xml/feed/feed.xml?type=feed&;format=atom for your feed URL, then your route.rb code is broken—it should match the old URLs.

  2. John Wang said 8 days later:

    Ugh. I copied over my 2.6.0 routes.rb file because I had made some edits and the major web URIs didn’t break. I didn’t realize the feed URIs would break but I should have known better; so much for wishful thinking. I really have to get on to SVK.

(leave url/email »)

   Comment Markup Help Preview comment