When enabling the SwitchMasterToWeb.config file for configuring the distributed Sitecore environment, you may face several issues:
Exception: System.InvalidOperationException Message: Could not find configuration node: contentSearch/indexConfigurations/indexUpdateStrategies/syncMaster Source: Sitecore.Kernel at Sitecore.Diagnostics.Assert.IsTrue(Boolean condition, String message) at Sitecore.Configuration.Factory.GetConfigNode(String xpath, Boolean assert) ... at Sitecore.ContentSearch.ContentSearchManager.get_SearchConfiguration() at Sitecore.ContentSearch.ContentSearchManager.GetIndex(String name) at Sitecore.ListManagement.ContentSearch.Pipelines.GetAllLists.GetAllContactLists..ctor()
ERROR [Experience Analytics]: System.InvalidCastException: Invalid cast from 'System.String' to 'Sitecore.Analytics.Reporting.Filters.IDataSourceFilterFactory'. at System.Convert.DefaultToType(IConvertible value, Type targetType, IFormatProvider provider) at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider) ... at Sitecore.Configuration.Factory.CreateObject[T](XmlNode configNode) at Sitecore.ExperienceAnalytics.Api.ReportingService.RunQuery(ReportQuery reportQuery) at Sitecore.ExperienceAnalytics.Api.Http.AnalyticsDataController.Get(ReportQuery reportQuery)
Exception: System.InvalidOperationException Message: Post condition failed Source: Sitecore.Kernel at Sitecore.Diagnostics.Assert.ResultNotNull[T](T result, String message) at Sitecore.Web.UI.HtmlControls.Data.DataViewFactory.GetDataViewByName(String name) at Sitecore.Web.UI.HtmlControls.Data.DataViewFactory.GetDataView(String name, String parameters) ... at Sitecore.Shell.Applications.ContentManager.ContentEditorForm.OnLoad(EventArgs e)
The issue may occur when some config files in the /App_Config/Include folder are applied after the SwitchMasterToWeb.config file and revert the configuration changes made by the SwitchMasterToWeb.config file.
To learn more about how Sitecore uses include config files, refer to the Include File Patching Facilities document.
Ensure that the SwitchMasterToWeb.config file is applied as the latest one in the list of configuration changes.
For example, follow the steps below: