I'm running Sitecore 8.2 update 4 and SXA 1.3 Update 1. I'm trying to get some custom 404 pages working so that my marketing team can enjoy creating their own 404 pages for each of the sites running on the Sitecore server. I've followed the instructions found here and here, however I'm getting an odd error when I go to a non-existent page.
[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) +194
Sitecore.Mvc.Pipelines.PipelineService.RunPipeline(String pipelineName, TArgs args, Func`2 resultGetter) +160
Sitecore.Mvc.Pipelines.Response.BuildPageDefinition.ProcessXmlBasedLayoutDefinition.AddRenderings(PageDefinition pageDefinition, BuildPageDefinitionArgs args) +237
(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) +194
Sitecore.Mvc.Pipelines.PipelineService.RunPipeline(String pipelineName, TArgs args, Func`2 resultGetter) +160
Sitecore.Mvc.Presentation.PageContext.GetPageDefinition() +269
Sitecore.Mvc.Presentation.PageContext.get_PageDefinition() +30
Sitecore.Mvc.Presentation.PageContext.GetPageView() +125
Sitecore.Mvc.Presentation.PageContext.get_PageView() +30
Sitecore.Mvc.Controllers.SitecoreController.GetDefaultAction() +25
lambda_method(Closure , ControllerBase , Object[] ) +89
I've looked all over the internet for an answer for how to setup a custom error page using SXA. If I remove the config file that loads the GetXmlBasedLayoutDefintion
call, then my 404 page handler resolves fine. I'm sure that there is something that I've missed, but I'd love some help.