Exception is thrown when a page is visited by robots

  • Search engines might not index pages that have Commerce campaigns and goals assigned or triggered via code, because they cannot access them. The exception is thrown because Commerce Connect does not cover scenarios when robots are involved in site browsing. According to the Sitecore Analytics design, such visitors are skipped. However, Sitecore Commerce invokes the Analytics API for search engine robots, which results in the issue. The following message might appear:

    Exception: System.NullReferenceException
    Message: Object reference not set to an instance of an object.
    Source: Sitecore.Commerce
      Sitecore.Commerce.Pipelines.Common.TriggerPageEvent.Process(ServicePipelineArgs args) +1443
      (Object , Object[] ) +82
      Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) +364
      Sitecore.Commerce.Pipelines.PipelineService.RunPipeline(String pipelineName, TArgs args) +69
      Sitecore.Commerce.Services.ServiceProvider.RunPipeline(String pipelineName, TRequest request) +281
      Sitecore.Reference.Storefront.Managers.CatalogManager.VisitedCategoryPage(CommerceStorefront storefront) +261
       Sitecore.Reference.Storefront.Controllers.CatalogController.VisitedCategoryPage() +36
       ...
  • To resolve the issue in XP 8.2 Update-1 with SXC SCpbCS 8.2 Initial Release, download and apply the hotfix available here: SC Hotifx 215854-1 Commerce.Connect 8.2.357.zip.

    Be aware that the hotfix was built specifically for the specified releases, and you must not install it on other Sitecore Commerce versions or in combination with other hotfixes, unless explicitly instructed by Sitecore Support. Contact Sitecore Support to get a solution for other releases.

Applies to:

Sitecore Commerce 8.1+

November 20, 2019
November 20, 2019

Reference number:

117840