The following is a presentation I gave at the Milwaukee SItecore Developer meetup. The presentation was sort of a back to basics...
Preview in Sitecore 8.1 BrokenDerek 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._