Some things to consider when upgrading to EPiServer CMS 6 R2

The upgrade from R1 to R2 took slightly longer time than I anticipated and I thought I’d document some lessons learned in this post.

Resetability

This is in no way unique to this upgrade but this is the first upgrade where I’ve used Git and had powershell scripts to easily restore databases. This has helped speed the (many) rollbacks I’ve made during the process up and I don’t even want to imagine how much time it would have taken with TFS or some other non-distributed version control system.

Updated sql script

If your site uses fetch data from page you will need to manually update a sql script since there is a bug in the one shipped as part of R2. This script is available here and more information can be found in this blog post.

Does your initialisation modules require a web context?

During the upgrade your initialization modules are invoked and some may fail because they are not run in a web context and this will prevent the upgrade to succeed. This happened to me with a module that accessed UrlRewriteProvider. See this post and the comment from Johan Björnfot.

Breaking and semantic changes

There are a few changes to be aware of. The breaking changes are listed in this document and Fredik Tjärmberg also posted a list of API changes between R1 and R2.

As Fredrik points out this list does not contain semantic changes. One I encountered related to LinkItemCollection and how it now overrides Equals. This is probably a change that won’t affect that many but can be good to know non-the less. I also found a bug when using a specific overload of PropertyPageCollection you can set the obejct in an invalid state, see this post for more information.

PageTypeBuilder

A new release of Page type builder (1.3.1) has been released and this fixes some problems in R2. Joel has written a post on this here. The task of manually updated all sort order fields that were not unique was not fun.

Problem with saving pages

Several people have had problem that when saving and publishing a page you are greeted by a json string that looks something like {“saved:” false, “pagelink:”1234:123″}. This seems to be related to the new auto-save functionality that shipped as part of R2. Disabling this have solved the problem for us and apparently also for Ted Nyberg who discovered the cause.

New version of MVC

R2 uses Asp.Net MVC 2 instead of MVC 1 used in R1. This might affect you if you, like us, use EPiServer gadgets and have other parts of your web site that are using MVC to serve content. There are some breaking changes between the two so be aware of this when estimating how long the upgrade will take. This is a pretty good list of what you get with MVC 2.

Handling changes in .config files

During the upgrade your .config files in the web directory are updated. This is all fine and dandy except you probably store your config files somewhere else and you’re using some form of transformation to accompany your different setups for test, staging and other environments. This means that the next time you build (or however you trigger the transformation) the changes are overwritten. There are a number of ways to solve this, what I did was to do a diff on the .config files before and after the upgrade and do the corresponding changes in the master config files.

  • Pello

    Nice post Stefan. Care to elaborate on how you used Git and powershell to simplify the process?

    • http://www.popkram.com Stefan Forsberg

      I’ll try and write a follow-up post on this.

  • Andreas

    Great summary and post as always Stefan. I think you should get some salary from EPiServer for doing their work ;)

  • Marcello

    Great post, this will be useful for us when we will upgrade.

  • Pingback: Upgrade EPiServer CMS 6 to 6R2 (6.0 to 6.1) | Learning Journal

  • Robert

    Great post! Would have been nice to have when we upgraded.

  • http://www.facebook.com/niklas.ringdahl Niklas Ringdahl

    Looks great and thorough, will definitely use this when upgrading!

  • Sd

    fgfh