Monday, April 27, 2015

SwitchMasterToWeb Woes

Scenario: You are using Sitecore 8—I think this also applies to 7.5—and have enabled the SwitchMasterToWeb.config. You now see see an exception related to 'master' database. For example:

  • Could not find configuration node: contentSearch/indexConfigurations/indexUpdateStrategies/syncMaster



Cause: Sitecore patches files found in the \Include folder first and then recursively patches all files found in sub-folders of \Include. In all cases, Sitecore follows alphabetical order when deciding which folder or file to examine next. This means that the SwitchMasterToWeb.config file placed in \Include will be merged before config files found in sub-folders. Some of those config files are for indexes and those index try to use the syncMaster strategy.

Resolution: Place the SwitchMasterToWeb.config file in a sub-folder like "zzzMustBeLast" and reload your site!

2 comments:

  1. Hello,

    Do we know if this issue was ever fixed on later versions of Sitecore?

    Thanks
    M

    ReplyDelete
    Replies
    1. Yes, in 8.1 (perhaps in later patches of 8.0, but don't quote me on that) the SwitchMasterToWeb.config file is placed in a folder called 'Z.SwitchMasterToWeb'.

      Delete