2

I am getting an error when i try to hit any page in CD. It was fine and all of sudden started receiving this error. I am not able to figure out what caused this issue. Could anyone faced this issue and can help out me here?

Below is the error screen.

Below is the log details:

        ManagedPoolThread #1 11:42:24 INFO  Job started: Index_Update_IndexName=sitecore_master_index
        ManagedPoolThread #1 11:42:24 INFO  Job ended: Index_Update_IndexName=sitecore_master_index (units processed: )
        ManagedPoolThread #5 11:42:26 INFO  Job started: Index_Update_IndexName=sitecore_fxm_master_index
        ManagedPoolThread #5 11:42:26 INFO  Job ended: Index_Update_IndexName=sitecore_fxm_master_index (units processed: )
        6652 11:42:30 ERROR Failed to render rendering
        Exception: System.Web.HttpUnhandledException
        Message: An unhandled exception occurred.
        Source: Sitecore.Mvc
           at Sitecore.Mvc.Pipelines.MvcEvents.Exception.ShowAspNetErrorMessage.ShowErrorMessage(ExceptionContext exceptionContext, ExceptionArgs args)
           at Sitecore.Mvc.Pipelines.MvcEvents.Exception.ShowAspNetErrorMessage.Process(ExceptionArgs 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.OnException(ExceptionContext exceptionContext)
           at System.Web.Mvc.ControllerActionInvoker.InvokeExceptionFilters(ControllerContext controllerContext, IList`1 filters, Exception exception)
           at System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName)
           at System.Web.Mvc.Controller.ExecuteCore()
           at System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext)
           at Sitecore.Mvc.Controllers.ControllerRunner.ExecuteController(Controller controller)
           at Sitecore.Mvc.Controllers.ControllerRunner.Execute(TextWriter writer)
           at Sitecore.Mvc.Pipelines.Response.RenderRendering.ExecuteRenderer.Render(Renderer renderer, TextWriter writer, RenderRen+
        s args)
        
        Nested Exception
        
        Exception: System.ArgumentNullException
        Message: Value cannot be null.
        Parameter name: item
        Source: Sitecore.Kernel
           at Sitecore.Diagnostics.Assert.ArgumentNotNull(Object argument, String argumentName)
           at Sitecore.Links.LinkProvider.GetItemUrl(Item item, ItemUrlBuilderOptions options)
           at Sitecore.XA.Foundation.Multisite.LinkManagers.LocalizableLinkProvider.GetItemUrl(Item item, ItemUrlBuilderOptions options)
           at Sitecore.XA.Feature.Search.Repositories.SearchBoxRepository.GetSearchResultPageUrl()
           at Sitecore.XA.Feature.Search.Repositories.SearchBoxRepository.GetJsonDataProperties()
           at Sitecore.XA.Feature.Search.Repositories.SearchBoxRepository.GetModel()
           at Sitecore.XA.Foundation.Mvc.Controllers.StandardController.Index()
           at lambda_method(Closure , ControllerBase , Object[] )
           at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
           at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass24_0.<InvokeActionMethodWithFilters>b__0()
           at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation)
           at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation)
           at System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName)
2
  • Please compare the web root folder of CD and CM via Win Merge and see any difference you have in config files. Apr 2, 2022 at 9:26
  • On the news pagination page, check the search box component properties. It must have search result page set. Does the search result page exists in web? Looking at error, it seems the search Result page is configured but doesn't exist. Please configure it once again and publish it. May 2, 2022 at 20:55

1 Answer 1

0

It looks like your index is out of date.

From the exception, it looks like there is an item in your index but it's not there in your database anymore:

at Sitecore.Links.LinkProvider.GetItemUrl(Item item, ItemUrlBuilderOptions options) 
at Sitecore.XA.Foundation.Multisite.LinkManagers.LocalizableLinkProvider.GetItemUrl(Item item, ItemUrlBuilderOptions options) 
at Sitecore.XA.Feature.Search.Repositories.SearchBoxRepository.GetSearchResultPageUrl()
...

You can see it there: GetSearchResultPageUrl calling GetItemUrl.

Easiest way to fix? Rebuild the index. Which index? From your stack trace it looks like you're using SXA so try sxa web and sxa master indexes.

2
  • I have done that , but that doesn't help. Also Republishing the whole tree, Re-Indexing, IIS Restart all done. Still getting the same error.
    – Jey
    Nov 2, 2021 at 12:58
  • Did you rebuild the link database apart from reindexing? Nov 16, 2021 at 6:58

Your Answer

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

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