Sometimes when we change config file or deploy new code, we see this exception on first load of page:

Server Error in '/' Application.

Index sitecore_marketingdefinitions_master was not found

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: Sitecore.ContentSearch.Exceptions.IndexNotFoundException: Index sitecore_marketingdefinitions_master was not found

Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[IndexNotFoundException: Index sitecore_marketingdefinitions_master was not found] Sitecore.ContentSearch.ContentSearchManager.GetIndex(String name) +127 Sitecore.Marketing.Search.BaseDefinitionSearchProvider2..ctor(String indexName) +91 Sitecore.Marketing.Search.ProfileDefinitionSearchProvider..ctor(IDefinitionManagerSearchSettings searchSettings) +113 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +31 Microsoft.Extensions.DependencyInjection.ServiceLookup.ConstructorCallSite.Invoke(ServiceProvider provider) +339 Microsoft.Extensions.DependencyInjection.ScopedCallSite.Invoke(ServiceProvider provider) +116 Microsoft.Extensions.DependencyInjection.ServiceLookup.ConstructorCallSite.Invoke(ServiceProvider provider) +111 Microsoft.Extensions.DependencyInjection.ScopedCallSite.Invoke(ServiceProvider provider) +116 Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetService(IServiceProvider provider) +69 Sitecore.Marketing.Definitions.DefinitionManagerFactory.GetDefinitionManager() +84 Sitecore.Analytics.Data.<>c__DisplayClass7_0.<.ctor>b__4() +69 System.Lazy1.CreateValue() +737 System.Lazy1.LazyInitValue() +431 Sitecore.Analytics.Data.MarketingDefinitions.InitializeProfilesWithDefaultValues() +80 System.Lazy1.CreateValue() +737 System.Lazy`1.LazyInitValue() +431 Sitecore.Analytics.Data.TrackingField.InitializeProfiles() +106 Sitecore.Analytics.Data.TrackingField..ctor(Field innerField) +133 Sitecore.Analytics.Data.TrackingField.GetTrackingField(Item item) +106 Sitecore.Analytics.Data.ProfileUtil.GetProfiles(Item item, TrackingField& trackingField) +41 Sitecore.Shell.Applications.ContentEditor.Pipelines.RenderContentEditorHeader.ProfileCardsControl.RenderProfileCardIcons(Item item, HtmlTextWriter output, Boolean& hasCardsConfigured) +128 Sitecore.Shell.Applications.ContentEditor.Pipelines.RenderContentEditorHeader.ProfileCardsControl.RenderProfileCards(Item item, HtmlTextWriter output) +570 Sitecore.Shell.Applications.ContentEditor.Pipelines.RenderContentEditorHeader.ProfileCardsControl.OnInit(EventArgs e) +260 System.Web.UI.Control.InitRecursive(Control namingContainer) +460 System.Web.UI.Control.InitRecursive(Control namingContainer) +225 System.Web.UI.Control.AddedControl(Control control, Int32 index) +245 Sitecore.Web.UI.Sheer.ClientPage.AddControl(Control parent, Control control, String placeholder) +234 Sitecore.Shell.Applications.ContentManager.Editor.Render(RenderContentEditorArgs args, Control parent) +283 Sitecore.Shell.Applications.ContentManager.ContentEditorForm.RenderEditor(Item item, Item root, Control editorsContainer, Boolean showEditor) +291 Sitecore.Shell.Applications.ContentManager.ContentEditorForm.UpdateEditor(Item folder, Item root, Boolean showEditor) +487 Sitecore.Shell.Applications.ContentManager.ContentEditorForm.Update() +568 Sitecore.Shell.Applications.ContentManager.ContentEditorForm.OnPreRendered(EventArgs e) +212

[TargetInvocationException: Exception has been thrown by the target of an invocation.] System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) +0 System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) +128 System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +146 Sitecore.Reflection.ReflectionUtil.InvokeMethod(MethodInfo method, Object[] parameters, Object obj) +89 Sitecore.Shell.Applications.ContentManager.ContentEditorPage.OnPreRender(EventArgs e) +143 System.Web.UI.Control.PreRenderRecursiveInternal() +200 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +7574

When we refresh the page, everything is working as expected.

Has anybody encountered similar issues?

How we can prevent this happening?

  • Are you doing deployments on Azure ? Apr 27, 2018 at 10:38
  • This is in local machine so on premise. Apr 27, 2018 at 12:03
  • Yes, I also have the same issue, but still don’t know how can we resolve it. Apr 28, 2018 at 5:17
  • 1
    Did you already report it to Sitecore Support? Jun 25, 2018 at 7:22
  • 1
    You will be able to find this index configurations in Sitecore.Marketing.Solr.Index.Master.config, in case of solr. same way there is another config for Lucene and Azure. If you look at this config then it has Manual Index Strategy. So you must have to rebuild this index. It might be possible that after deployment, you directly hit the site URL which might not initialize the sitecore_marketingdefinitions_master index. Please try to load content editor and rebuild this index first, after deployment.
    – NSP
    Jun 25, 2018 at 9:23

2 Answers 2


It looks like the index is not initialized. Adding the following to the marketingDefinitionSolrIndexConfiguration should fix it:


Since the question was about a developer machine, the initial answer does not apply:

Can you check whether you have this configuration in your delivery server?

<searchIndexName patch:source="Sitecore.Marketing.Search.config">sitecore_marketingdefinitions_master</searchIndexName>

On the delivery systems, this should probably point to sitecore_marketingdefinitions_web. The line should be in the file Sitecore.Marketing.Search.config.

  • This is on the dev machine and as I mentioned after refresh everything's alright. Jun 27, 2018 at 9:45
  • Does adding <initializeOnAdd>true</initializeOnAdd> to the marketingDefinitionSolrIndexConfiguration fix it?
    – Markus
    Jun 27, 2018 at 9:54
  • Adding <initializeOnAdd>true</initializeOnAdd> fixes it for me.
    – Joost
    Jul 16, 2018 at 10:38
  • I am using sitecore 9.0 update 2 and adding the <initializeOnAdd>true</initializeOnAdd> fixed my issue on my CD environment. Nov 14, 2018 at 1:31
  • Seems like this is a bug since it happens on vanilla installs.
    – jrap
    Dec 19, 2018 at 15:16

Same. Plain vanilla install of 9.1 and getting these index errors. Will get to the bottom of it...

Also wondering why all the configs are enabled by default - We are doing the default Solr install so surprised to see the Azure and Lucene configs in there. Possibly there is a setting that disables them when Solr is being used, but Sitecore configs used to be disabled if they weren't active, so this is a bit confusing. I am changing the names to .disabled just to be sure it isn't one of these other configs causing the error, as there are mentions of these indexes in all the configs


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.