Sitecore Marketing Definition Missing

How to fix the error message indicating the sitecore_marketingdefitions_master index was not found.

If you've been working with Sitecore 9+, on Solr, and been using xDB or EXM or even on a Standalone instance and enabled or disabled xDB recently, then it's likely (though not guaranteed) that you've encountered an error message indicating the sitecore_marketingdefitions_master index was not found.

What does the error look like? Glad you asked. Depending on your level of exception gathering, you may not see it until you look in your log files, or you may see that dreadful yellow error screen. In any case, the error message typically resembles the following:

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

This is an error that can cause some anxiety especially when it shows up after what may have seemed like an innocuous change. It's also an error that can go away if you refresh your browser a few times. However, while that may work, it's not going to stop the error from reoccurring.

How To Fix It?

It turns out, the simplest solution is adding a patch file with the tag <initializeOnAdd>true</initializeOnAdd> to the <marketingDefinitionSolrIndexConfiguration> section.

What does that patch file look like exactly? Glad you asked. Below you'll find one we have used recently. Just store it in your App_Config/include directory and your problem should go away. Note that depending on your environment, you may need to make adjustments to the role attribute if you've modified yours accordingly.

<configuration xmlns:patch="" xmlns:set="" xmlns:search="" xmlns:role="">
  <sitecore role:require="Standalone or ContentDelivery or ContentManagement" search:require="solr">
          <initializeOnAdd patch:before="fieldMap">true</initializeOnAdd>

In The End...

While a lot of the out-of-the-blue errors that appear with Sitecore, may seem like mountains to overcome, many of them are easily solvable. Some as simple as with a patch file. We hope this solution finds you well.

👋 Hey Sitecore Enthusiasts!

Sign up to our bi-weekly newsletter for a bite-sized curation of valuable insight from the Sitecore community.

What’s in it for you?

  • Stay up-to-date with the latest Sitecore news
  • New to Sitecore? Learn tips and tricks to help you navigate this powerful tool
  • Sitecore pro? Expand your skill set and discover troubleshooting tips
  • Browse open careers and opportunities
  • Get a chance to be featured in upcoming editions
  • Learn our secret handshake
  • And more!
Sitecore Snack a newsletter by Fishtank Consulting

Meet David Austin

Development Team Lead | Sitecore Technology MVP x 3


David is a decorated Development Team Lead with Sitecore Technology MVP and Coveo MVP awards, as well as Sitecore CDP & Personalize Certified. He's worked in IT for 25 years; everything ranging from Developer to Business Analyst to Group Lead helping manage everything from Intranet and Internet sites to facility management and application support. David is a dedicated family man who loves to spend time with his girls. He's also an avid photographer and loves to explore new places.

Connect with David