Sitecore 10.4.0 - Sidekick 1.7 Compatibility Issue
Recently, I saw a thread in Sitecore slack channel wherein someone had raised an issue with regard to compatibility of Sitecore Sidekick with Sitecore 10.4.0 instance. So, as ever, i decided to take the issue in my own hands and see if I could deal with and find a fix! This blog note is as a result of that weekend adventure. Although I started this work as a troubleshooting session, I later realised there is so much to cover in terms of existing Sidekick technical design and interoperability with Sitecore. As a result, I spent quite a good time revisiting the related code as well as this post to make it interesting. This blog post also hinges on one of the differences of v10.4.0 compared with earlier versions - the EnsureLoggedInforPreview processor has been moved from mvc.requestBegin pipeline to mvc.actionExecuting pipeline.
First things first, I followed this blog post by Madhu to setup a local 10.4.0 instance and published the Sidekick configs and dlls to the 10.4.0 instance, as stated. Now, once I clicked the menu in the Sitecore desktop, bingo, the error was quite evident. Simultaneously, I setup a 10.3.0 instance side-by-side and did the same process of publishing the sidekick configs and dlls to confirm that the issue was very much specific to 10.4.0 instance.
YSOD in Sitecore 10.4.0 instance:
10.3.1 Sitecore.MVC decompiled DLL:
10.4.0 Sitecore.MVC decompiled DLL:
RequestBegin pipeline processor is obsolete and new change is part of ActionExecuting process and the class is internal:
Juxtaposing the latest showconfig against a 10.3 version:
Based on the error, I decided to patch the config to debug what causes the error and it looks like the context for PageMode.IsNormal isn't available in the new pipeline processor:
********
1733568 12:34:31 ERROR Application error.
Exception: System.NullReferenceException
Message: Object reference not set to an instance of an object.
Source: Sitecore.Mvc
at Sitecore.Mvc.Pipelines.Request.ActionExecuting.EnsureLoggedInForPreview.Process(ActionExecutingArgs 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.Filters.PipelineBasedRequestFilter.OnActionExecuting(ActionExecutingContext actionExecutingContext)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.InvokeActionMethodFilterAsynchronouslyRecursive(Int32 filterIndex)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.InvokeActionMethodFilterAsynchronouslyRecursive(Int32 filterIndex)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass7_0.<BeginInvokeActionMethodWithFilters>b__0(AsyncCallback asyncCallback, Object asyncState)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase`1.Begin(AsyncCallback callback, Object state, Int32 timeout)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.BeginInvokeActionMethodWithFilters(ControllerContext controllerContext, IList`1 filters, ActionDescriptor actionDescriptor, IDictionary`2 parameters, AsyncCallback callback, Object state)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass3_1.<BeginInvokeAction>b__0(AsyncCallback asyncCallback, Object asyncState)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase`1.Begin(AsyncCallback callback, Object state, Int32 timeout)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.BeginInvokeAction(ControllerContext controllerContext, String actionName, AsyncCallback callback, Object state)
at System.Web.Mvc.Controller.<>c.<BeginExecuteCore>b__152_0(AsyncCallback asyncCallback, Object asyncState, ExecuteCoreState innerState)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallBeginDelegate(AsyncCallback callback, Object callbackState)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase`1.Begin(AsyncCallback callback, Object state, Int32 timeout)
at System.Web.Mvc.Controller.BeginExecuteCore(AsyncCallback callback, Object state)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase`1.Begin(AsyncCallback callback, Object state, Int32 timeout)
at System.Web.Mvc.Controller.BeginExecute(RequestContext requestContext, AsyncCallback callback, Object state)
at System.Web.Mvc.MvcHandler.<>c.<BeginProcessRequest>b__20_0(AsyncCallback asyncCallback, Object asyncState, ProcessRequestState innerState)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallBeginDelegate(AsyncCallback callback, Object callbackState)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase`1.Begin(AsyncCallback callback, Object state, Int32 timeout)
at System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, Object state)
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)
********
Log trail for Sitecore 10.4.0 - Sidekick inter-dependency:
#########
#########
Comments
Post a Comment