Here is why you always should clear your browser history after a Sitecore upgrade

Recently, I did a Sitecore upgrade from version 8.1 Initial Release to version 8.2 Update 5. Basically, I just had to disabled xDB, run a couple of SQL queries, install the Sitecore Update Installation Wizard and finally install the upgrade package. Easy! But then, after finishing the upgrade, I opened Content Editor and surprise!

The Content Editor layout was broken! Actually, the Sitecore desktop wallpaper was still being displayed and, worst, overlaying the Content Editor.

Content Editor issue
Figure 1: Content Editor issue

Obviously, I followed the expected way to figure out what happened.

Firstly, I panicked.

Secondly, I opened the Chrome Developer tools to inspect the logs in the console. At a first glance, it seemed to be a style or a script issue.

:{“stack”: “TypeError: Cannot read property ‘getElementsByTagName’ of null \n
at scContentEditor.updateFieldMarkers (http://mysitecore.local/sitecore/Applications/Content%20Manager/Content%Editor.js:1475:61) \n
at http://mysitecore.local/sitecore/shell/Applications/Content-Editor?ic=Apps%2F48x48%2Pencil.png&he=Content%20Editor&c1=0:281:1006”, “message”: Cannot read ‘getElementsByTagName’ of null, “name”: “TypeError”, “logData”: “Uncaught TypeError: Cannot read property ‘getElementsByTagName’ of null”}
jsnlog.min.js:1
Console tab in the Chrome Developer tools.
Figure 2: Console tab in the Chrome Developer tools.

I was right. Something in the Javascript just got broken. Then I run WinMerge comparing the contents in my upgraded instance with the contents of a Sitecore 8.2 upgrade 5 zip folder. For my misfortune, it didn’t find any relevant difference.

Next, I tried searching for the error above in the Google and Sitecore StackExchange, but I found nothing.

Then, I did the most reasonable thing to do. I panicked again. I thought that, somehow, the Sitecore upgrade package messed with my local instance and worst, I would have to either redo the upgrade or try the hardest I could to find out what went wrong.

Finally, after reading Sitecore 8.2 Update 5 Upgrade Guide, I came across the session 1.4.1 Clear the Browser Cache. Well, it’s worth the try, I thought.

Clearing the browser history (everything)
Figure 3: Clearing the browser history (everything)

I cleared all the browser data. And for my surprise, it just fixed everything!

It was as if that problem never happened.

Lessons I learned

  1. Always read all the documentation (twice) before doing any upgrade or major change in your Sitecore instance
  2. Follow every step as it says. Don’t think a step is too silly to do. There is a very good reason for that step being there (believe me!)

Hope this brief article helps you with future Sitecore upgrades and installations.

References:

2 thoughts on “Here is why you always should clear your browser history after a Sitecore upgrade

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s