Derek Dysart

Derek Dysart


Periodic notes from an independent Sitecore Developer/Architect

October 2017
M T W T F S S
« Sep    
 1
2345678
9101112131415
16171819202122
23242526272829
3031  

Categories


Preview in Sitecore 8.1 Broken

Derek DysartDerek Dysart

While in the process of testing a site that is being upgraded to Sitecore v8.1 a serious issue was uncovered – none of the pages would preview. After looking into the error, some code that was dependant on the site context was not correctly resolving to the correct site. Instead, the site context was “website” as opposed the the expected site.

It turns out that Sitecore added a new setting called Preview.ResolveSite which defaults to false. What this means is Sitecore will not try to resolve the site the item you are previewing and default back to the site specified in the Preview.DefaultSite setting, which by default is website. Changing this setting to true restored the site context and therefore the ability to preview the site.

Thanks goes out to Kamruz Jaman for the helping me out in the Sitecore Slack Community on this one._

Independent Sitecore developer. I also blog about other stuff from time to time.