Why are Sitecore upgrades such a pain?

by Michael Sundstrøm 16. April 2016 09:00

We've just tried and failen when upgrading a Sitecore solution to 8.1 update 1.
The promise from Sitecore is that it is no biggy upgrading their product. I have never experienced delivery on that promise, yet. 

Patches uppon patches

In our solution we have 10 support patches to errors in the product that could not be ignored. We have tons of other bits and pieces that we luckily don't use.

To make sure that these patches are still applicable we're contacted Sitecore support. Even Sitecore support are having a hard time figuring out which bugs have been fixed and which haven't, and of a given patch can be used in later versions of the product.
I'm glad I am not in their shoes.

Upgrade paths

As most people that have ever tried to upgrade a Sitecore solution knows there are some upgrade paths that you need to follow to make sure the upgrade is done correctly and the solution works afterwards.
Sometimes, however, there are some paths that just don't lead to the same end goal, thereby leading to digital rot. 

Digital rot

When having a Sitecore solution that has undergone a few upgrades a substantial amount of digital rot starts to appear. 
Older upgrades did not clean up the database very well. That means that there may be older items that is not used anymore but still are stored in the Sitecore databases.

Breaking changes

When upgrading a Sitecore solution there are always the possibility of breaking changes.

In our case we upgraded Webforms for Marketers to the new version and suddenly our custom actions did not work. Someone broke the interface, by adding some new objects that needed to be added as well. Was it documented somewhere what data should hold and be used for? Of course not. 
The natural response was yet another ticket at Sitecore Support. The response was a little wierd. A link to a blog post about making WffM actions the old way. At Pentia we know how to make custom action for WffM, thank you very much. 

Also Sitecore moved almost EVERY setting ever made into Sitecore.config. But not one-to-one. Some items were moved or renamed, which was a bit of a hazzle. 


Upgrading a Sitecore solution with real data is no easy task. Maybe upgrading in Sitecores Labs is easy enough, but in the real world it is a totally different ball game.
Sometimes I wish that Sitecore would ask their implementation partners to give them real data they could try to make the upgrade on. 

Maybe it is time that Sitecore thought about splitting the product up into smaller pieces (Modules) with fewer moving parts. Thereby making upgrades easier.

And Sitecore, please start documenting all changes.  


Any war stories please add a comment below

System.IO.FileFormatException: Expected length to be 16, not 4.

by Michael Sundstrøm 29. February 2016 08:31

A word of warning!
If you use the contacts database in Sitecore 8 you might run into some serious issues when upgrading to Sitecore 8.1 Update 1.

It seems that the datatype of the GeoIp has changed length from 4 to 16 characters. The 8.1 code does not handle the backward compatibility at all. :(

I started a ticket with Sitecore Helpdesk on this issue, and was asked to run this little tool on the MongoDB Analytics database.


That seemed to solve the problems. 

Thanks to Alexander Vasilenko and Ivan Sheyenko from Sitecore Helpdesk for helping solve this issue. 


Sitecore | WTF

Language is defaulting to english after upgrading to Sitecore 8.1.1

by Michael Sundstrøm 26. February 2016 09:37

We have a solution running in the danish language layer. After upgrading the solution to Sitecore 8.1 update 1 the site defaulted to english, the siteresolving seemed off and the link manager rendered links to a api website instead of the website that serves the content as HTML.

After researching a bit I discovered that Sitecore have introduced a new Sitecore.DefaultLanguage.config file. 

Disabling this file solved the problem. 


Sitecore | WTF

Why does my MongoDB data not get restored on my new server?

by Michael Sundstrøm 16. February 2016 18:49

Yesterday we experienced (Pun intended) a very strange behaviour when moving a Sitecore analytics database to a newly installed server. 

Using the normal mongodump/mongorestore commands 

mongodump --db Sitecore_Mongo_Analytics --out d:\mongodumps\
mongorestore --db Sitecore_Mongo_Analytics d:\mongodumps\

the data was backed up but when using mongorestore the database to the new server the data did not get restored. We only got an empty database. 

It seems that MongoDB 3.2 is not compatible with MongoDB 3.0.9 (The source of the original backup)

Thanks to my collegue Lasse Aagaard Pedersen for helping solve that little mystery.


Sitecore | WTF | MongoDb

Nice little tool when developing newsletters

by Michael Sundstrøm 23. September 2015 16:00

For the last week I've been bugfixing a newsletter for one of our clients. 

I always dreaded working on newsletters. You have to send the newsletter some time, and the fear of by accident sending the newsletter to all users of some list is always there. Until now.

My good collegue Brian told me about a nice little tool - Smtp4Dev.

Saved my week now i can send again and again without risking sending to the wrong people or having our system-admin yelling at my because I send 10000 email to our mail server. 

Thanks to RNWood for making the tool :)



Developer | General

Why do I get an error while uploading images to the Sitecore image library

by Michael Sundstrøm 12. May 2015 14:17

Yesterday I saw this error in Sitecore 8. 

[ArgumentNullException: Value cannot be null. Parameter name: key]
System.Collections.Generic.Dictionary`2.FindEntry(TKey key) +14370237
System.Collections.Generic.Dictionary`2.TryGetValue(TKey key, TValue& value) +20
  .GetLiteralTraceData(LiteralControl literal, TraceData& data) +71

  .GetTraceData(Object renderedObject) +223

  .EndRendering(TextWriter writer, Object renderedObject) +47

Being the first time I am running a project on Sitecore 8 I feared the product had died on me :(

This seem to be caused by an error in Visual Studio 2013

Simply adding this guy to webconfig app settings solves the problem

<add key="PageInspector:ServerCodeMappingSupport" value="Disabled"/>

Thanks to Alexander Sharamok for pointing me in the right direction.  

Why does the browser not robots.txt file from the server?

by Michael Sundstrøm 2. July 2014 10:51

I client of mine resently ran into a wierd problem.

I had a robots.txt on a server but it didn't get send to the client.


It seemed that the server didn't allow txt files to be send.

This is easy to solve thou.

Simply add the settings below to the web.config (/configuration/system.webServer/security/requestFiltering/fileExtensions)

  <removed fileExtension=".txt" />
  <add fileExtension=".txt" allowed="true" />




Why does my Sitecore website keep recycling?

by Michael Sundstrøm 5. March 2014 10:05

For a week now one of our clients websites have had very poor performance.

It seem that the application pool was recycle all the time.


We have tried everything until I notices this setting


<setting name="Caching.DisableCacheSizeLimits" value="false" />


We're running a 64-bit application where this is not needed, since it has a larger memory space available.

Flipping this switch seems to have solved the problem. 



.net | Sitecore | WTF

Nice Chrome Extension for Sitecore

by Michael Sundstrøm 31. October 2013 10:02

I collegue of mine referred me to this extension for Google Chrome.

Very useful :) 


Sitecore package tool (WTF?!!)

by Michael Sundstrøm 18. October 2013 16:40

A few weeks ago a collegue of mine discovered a strange behaviour in Sitecore’s package tool.

We needed to deploy some template updates to a client’s preproduction environment. We had some items that we did not want to be updated in preproduction. Instead of having to include each item or make some more or less successful query he decided to exclude the item (Like so)



The result was not quite what one would expect. Instead of leaving the item in preproduction the whole section was deleted causing a lot of weird error all over the application.



Sitecore | WTF