Senior Director &National Competency Lead – Sitecore Commerce
Sitecore Experience Editor Final Shared Layout Switch Disabled
I have noticed an issue recently in Sitecore Experience Editor where the functionality to switch between Final and Shared Layout is disabled. This article outlines the steps I have taken in order to address this.
As a content editor, we expect to see the preview of the page with Final Layout and Shared Layout.
In a multisite solution,we have different sites configured. In this scenario, if we request to see a page using Experience Editor, Sitecore by default resolves the site name to be "website" using the Preview.DefaultSite setting located in the /App_Config/Sitecore.config file.
At this point, you will notice that under Presentation, the button to switch between Final and Shared Layout is disabled.
In order to fix this, all you have to do is open the Sitecore.config file and look for setting Preview.ResolveSite and set the value to be true.
<!-- PREVIEW - RESOLVE SITE
If false, the Preview.DefaultSite setting specifies the context site to use when a user previews an item.
If true, when a user previews an item, Sitecore tries to resolve the root item and the context site based on the current content language
and the path to the item. If Sitecore cannot resolve the context site, it uses the site that is specified in the Preview.DefaultSite setting.
Default value: false (use the value of the Preview.DefaultSite setting)
<setting name="Preview.ResolveSite" value="true"></setting>
Once you have made that change, recycle your application pool to notice that the button is enabled, which allows us to switch between Final and Shared Layout.
This change has been applied and tested on Sitecore 8.1 Update-3
As always, please test these changes on your development environment before applying it on Production.