Since introducing SXA 1.3 on Sitecore 8.2 Update 4 we're seeing some odd behavior from our custom 404 pages. The pages work fine for URLs that have more than one level in the path (i.e. http://site/level1/level2) but we get an error on URLs with only one level (i.e. http://site/level1). This is happening for both our new SXA site (configured to use the SXA 404 setting) and our legacy site (configured to use the pre-SXA 404 settings). I'm not sure where to look to figure out what isn't configured correctly.
The error we get is:
[NullReferenceException: Object reference not set to an instance of an object.]
Sitecore.XA.Foundation.LocalDatasources.Pipelines.GetXmlBasedLayoutDefinition.ResolveLocalDatasources.Process(GetXmlBasedLayoutDefinitionArgs args) +85
(Object , Object[] ) +73
Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) +478
Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain) +21
Sitecore.Mvc.Pipelines.PipelineService.RunPipeline(String pipelineName, TArgs args) +191
Sitecore.Mvc.Pipelines.PipelineService.RunPipeline(String pipelineName, TArgs args, Func`2 resultGetter) +160
Sitecore.Mvc.Pipelines.Response.BuildPageDefinition.ProcessXmlBasedLayoutDefinition.AddRenderings(PageDefinition pageDefinition, BuildPageDefinitionArgs args) +218
(Object , Object[] ) +73
Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) +478
Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain) +21
Sitecore.Mvc.Pipelines.PipelineService.RunPipeline(String pipelineName, TArgs args) +191
Sitecore.Mvc.Pipelines.PipelineService.RunPipeline(String pipelineName, TArgs args, Func`2 resultGetter) +160
Sitecore.Mvc.Presentation.PageContext.GetPageDefinition() +267
Sitecore.Mvc.Presentation.PageContext.get_PageDefinition() +30
Sitecore.Mvc.Presentation.PageContext.GetPageView() +123
Sitecore.Mvc.Presentation.PageContext.get_PageView() +30
Sitecore.Mvc.Controllers.SitecoreController.GetDefaultAction() +25
lambda_method(Closure , ControllerBase , Object[] ) +89
System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) +228
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +34
System.Web.Mvc.Async.AsyncControllerActionInvoker.<BeginInvokeSynchronousActionMethod>b__39(IAsyncResult asyncResult, ActionInvocation innerInvokeState) +38
System.Web.Mvc.Async.WrappedAsyncResult`2.CallEndDelegate(IAsyncResult asyncResult) +70
System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult) +41
System.Web.Mvc.Async.AsyncInvocationWithFilters.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3d() +71
System.Web.Mvc.Async.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f() +385
System.Web.Mvc.Async.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f() +385
System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult) +42
System.Web.Mvc.Async.<>c__DisplayClass2b.<BeginInvokeAction>b__1c() +38
System.Web.Mvc.Async.<>c__DisplayClass21.<BeginInvokeAction>b__1e(IAsyncResult asyncResult) +36
Has anyone seen this or know where to look to get moving in the right direction?