I have started AB Testing in Sitecore 10.0.1 and in local it is working fine, I am able to see 2 different content. But the same thing is not working in a higher environment.

The main difference is that in local I have pointed my web database to master only(i.e. my master and web DBs are the same). In a higher environment, we have 3 Databases: master, web, and pub.

I am getting an error on a higher environment of : enter image description here

after clicking the ACTIVE TEST in Experience Optimization and the experience editor is opening`, but it is not coming in local.

  • Sounds like you have not published something. If you point the higher environment web connection string to master database, does that make the error go away? If so this confirms its defo a publishing issue. Suggest either doing a full site (incremental publish) or targeting all areas related (i.e. templates, layout/components etc). Please try that and let me know. Commented May 17, 2023 at 15:28
  • Also - you should update your question to include text of the erro rather thanthe screenshot. This allows google to find it in the future. Commented May 17, 2023 at 15:31

1 Answer 1


This appaears to be related to publishing rather than anything specific to AB testing.

Your screen grab shows that your HeaderV2 Action (in Navigation controller) is failing to render, with an 'Object Reference not set' exception.

Given your description in the question, about web pointing to master in local environment, this is almost certainly an issue with something not having been published correctly.

Please review (or post) the code that builds the HeaderV2 component. Look for any items that are rquired to populate that component and make sure they are all published.

A good way to check this is to go to dashboard => select web (bottom right). Then navigate the content editor and confirm that you can see all the templates and items that you know are used when building that component. Alternatively trigger a full site (incremental publish) - or publish those areas you know are important for that component.

  • Thanks for the suggestion, but it doesnt seem to be a publishing issue as the page is visible with header on the website which points to web database. The It is showing only one content which was latest. Not the other content which should also come 50% of the times. I have followed the blog linkedin.com/pulse/… and everything else are in place.
    – DiveshS
    Commented May 17, 2023 at 15:51
  • Is it possible content A is published and that is what you are seeing in the front end? Whereas content B (which should be switched in using AB test) is not actually fully published properly? Is this production environment? If not are you able to try pointing web at master like local and report result? Commented May 17, 2023 at 18:22
  • Thanks but I have republished everything and doesn't seem to be a publishing issue. The header is visible on website and in web db. Can you help me by knowing if there is any configuration related to AB Testing? Like which DB does it point and where are those configs written?
    – DiveshS
    Commented May 18, 2023 at 9:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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