2

Due to GDPR we have implemented a Cookie Consent banner on our Sitecore solution. As part of this implementation, we have created a custom pipeline to remove the SC_ANALYTICS_GLOBAL_COOKIE from the request if consent for statistical cookies has not been given. This has created an issue on pages where content testing is being used. If the cookie is not present in the request, the user gets an ugly error page

enter image description here

The error from the log is this:

9580 14:43:35 ERROR Application error.
Exception: System.NullReferenceException
Message: Object reference not set to an instance of an object.
Source: Sitecore.ContentTesting
at Sitecore.ContentTesting.Pipelines.EvaluateTestExposureBase`1.Process(TPipelineArgs args)
at (Object , Object )
at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)
at Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain, Boolean failIfNotExists)
at Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain)
at Sitecore.Mvc.Pipelines.PipelineService.RunPipeline[TArgs](String pipelineName, TArgs args)
at Sitecore.Mvc.Routing.RouteHttpHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

We would expect the content test to fail gracefully and just be ignored for requests without the cookie, as we are required to remove the cookie without proper consent.

Did anyone else run into this problem, and have a possible solution?

1 Answer 1

2

I got a reply from Sitecore Support. The issue is related to a registered bug in Sitecore which was fixed in Sitecore 10. There is a hotfix for Sitecore 9.3 here: https://kb.sitecore.net/articles/647546

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.