Errors after enabling the SwitchMasterToWeb.config file

  • Description

    When enabling the SwitchMasterToWeb.config file for configuring the distributed Sitecore environment, you may face several issues:

    • Exceptions similar to the following might be found in the log files or appear when working with the Sitecore Client:
      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 search indexes that should be disabled after applying the aforementioned config file, may still be present in the output of the /sitecore/admin/showconfig.aspx page:
      • sitecore_testing_index
      • sitecore_fxm_master_index
      • sitecore_list_index, etc.

    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:

    1. Create a sub-directory in the /App_Config/Include folder that is the latest one alphabetically comparing to other sub-folders (e.g. Z_SwitchMasterToWeb).
    2. Move the SwitchMasterToWeb.config file to that folder.

Applies to:

CMS 8+

June 18, 2015
June 18, 2015

Reference number:

435010

Keywords: 

  • CMS
  • ,
  • Scaling
  • ,
  • Search and Indexing