Upgrading EPiServer CMS 6 To 6R2 For dummys

Ok so its time for an yearly upgrade, here is my resume on how I succeeded with the whole process.

1. Download the installer from Episerver.
2. If you are using TFS Check out the whole project for Edit.
3. If you are using some form of config transform the chances are that you have “abstracted” the namespace in the episerver section
xmlns=”http://EPiServer.Configuration.EPiServerSection”, make sure this namespace exists in the Episerver section!
4. Take a backup of the web.config and the bin folder. Hell even take a back up of your database as well.
5. There is a bug in the epi installer that affects “Fetch pages from” to circumnavigate this problem:
Download the updated SQL script and save it in c:\Program Files x86\EPiServer\CMS\6.1.379.0\Upgrade\Database\sql (replace the old one).
6. Execute the installation program and cross your fingers.
7. Make sure to include all the new files that have been added to the VS project.
8. Get all the files that have been placed in the bin folder (copy them to your lib-folder) and make sure to update your assemblies reference
9. Update your config transform using WinMerge.
10. If you don’t want the annoying auto-save to fire every minute add autoSaveInterval=”0:30:00″ to your siteSettings section in web.config.
11.If you are using PageType Builder and having problems with pages not appearing (It happened to me in my listing pageType) it can be the bug mentioned here

Fix for that:
Download PageTypeBuilder 2.0 

Add the AsTyped() extension method on the PageDataCollection.

public PageDataCollection Pages
{
get
{
if (pages == null)
{
var factory = dataFactory as DataFactory;
var criterias = new PropertyCriteriaCollection();
if (factory == null)
return null;
if (RootPage.IsSet())
{
//Filtrera på PageType
int pageTypeID = PageTypeResolver.Instance.GetPageTypeID(typeof(PostPage)).Value;

//List pages for a specific container page
if (Folders.Any() && (ShowYearSelector) && !this.StartYear.HasValue && !this.StopYear.HasValue)
{
PageData folderPage = Folders.SingleOrDefault(p => p.PageName == CurrentYear.ToString());
if (folderPage != null)
{
pages = DataFactory.Instance.GetChildren(folderPage.PageLink);
pages = pages.Where(p => p.PageTypeID == pageTypeID).ToList().ToPageDataCollection();
}

}
//Ifall kalender/dokument/pressbilder
else
{
PropertyCriteria pageTypeCriteria = new PropertyCriteria();
pageTypeCriteria.Condition = EPiServer.Filters.CompareCondition.Equal;
pageTypeCriteria.Name = “PageTypeID”;
pageTypeCriteria.Type = PropertyDataType.PageType;
pageTypeCriteria.Value = pageTypeID.ToString();
pageTypeCriteria.Required = true;
criterias.Add(pageTypeCriteria);
pages = factory.FindPagesWithCriteria(RootPage, criterias);
}
sort();
}
}

return pages.AsTyped(); //<< Add this and it should work again
}
}

Happy hunting!

Leave a comment