Combined roles result in errors

  • Marketing Operations, Experience Analytics and Path Analyzer applications might fail to start when the following role combination is configured in the Web.config file: ContentManagement, Processing, Reporting. This happens due to the collision in the configuration files because some of them have an incorrect role:require attribute, which results in exceptions, for example, NotSupportedException or System.NullReferenceException. The following error messages might appear in the logs:

    ERROR One or more exceptions occurred while processing the subscribers to the 'item:creating' event.
    Exception: System.NotSupportedException 
    Message: Getting definition by alias is not supported. 
       Sitecore.Marketing.Operations.Xdb.ReferenceData.Service.Definitions.DefinitionReferenceDataRepositoryBase`4.GetByAlias(String alias, CultureInfo cultureInfo, Boolean includeInactiveVersion) +62
       Sitecore.Marketing.Definitions.DefinitionManagerBase`2.GetByAlias(String alias, CultureInfo cultureInfo, Boolean includeInactiveVersion) +216
       Sitecore.Analytics.Data.DefinitionCollection`1.get_Item(String name) +156
       Sitecore.Analytics.Data.TrackingField.ValidateLinks(LinksValidationResult result) +977
       Sitecore.Links.ItemLinks.AddLinks(Field field, List`1 links, ItemLinkState linkState) +179
       Sitecore.Links.ItemLinks.GetLinks(ItemLinkState linkState, Boolean allVersions, Boolean includeStandardValuesLinks) +1125
    ...
    Exception: System.NullReferenceException
    Message: Object reference not set to an instance of an object.
    Source: Sitecore.Analytics
       at Sitecore.Analytics.Data.TrackingField.ValidateLinks(LinksValidationResult result)
       at Sitecore.Links.ItemLinks.AddLinks(Field field, List`1 links, ItemLinkState linkState)
       at Sitecore.Links.ItemLinks.GetLinks(ItemLinkState linkState, Boolean allVersions, Boolean includeStandardValuesLinks)
       at Sitecore.Links.ItemLinks.GetValidLinks(Boolean allVersions)
       at Sitecore.Publishing.Pipelines.GetItemReferences.AddItemLinkReferences.GetReferences(Item item, Boolean sharedOnly, HashSet`1 processedItems)
       at Sitecore.Publishing.Pipelines.GetItemReferences.AddItemLinkReferences.GetItemReferences(PublishItemContext context)
       at Sitecore.Publishing.Pipelines.GetItemReferences.GetItemReferencesProcessor.Process(PublishItemContext context)
       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, Boolean failIfNotExists)
       at Sitecore.Publishing.Pipelines.GetItemReferences.GetItemReferencesPipeline.Run(PublishItemContext context, Boolean failIfNotExists)
    ...
  • To fix the issue, back up and update the following configuration files (if needed). Note that the role:require attribute might already be correct in your solution.

    • \App_Config\Sitecore\Marketing.xDB\Sitecore.Xdb.Remote.Client.config:
      <sitecore role:require="!Reporting">
    • \App_Config\Sitecore\Marketing.xDB\Sitecore.Xdb.Remote.Client.config:
      <processing role:require="!Processing">
    • \App_Config\Sitecore\Marketing.xDB\Sitecore.Xdb.Remote.Server.config:
      <reporting role:require="!ContentManagement">
    • \App_Config\Sitecore\PathAnalyzer\Sitecore.PathAnalyzer.RemoteClient.config:
      <sitecore role:require="ContentManagement AND !Reporting">
    • \App_Config\Sitecore\PathAnalyzer\Sitecore.PathAnalyzer.Services.RemoteServer.config:
      <sitecore role:require="Reporting AND !ContentManagement">
    • \App_Config\Sitecore\Marketing.Operations.Xdb.ReferenceData\Sitecore.Marketing.Taxonomy.Xdb.ReferenceData.config:
      <sitecore role:require="(Processing or Reporting) AND !ContentManagement">
    • \App_Config\Sitecore\Marketing.Operations.Xdb.ReferenceData\Sitecore.Marketing.Operations.Xdb.ReferenceData.config:
      <sitecore role:require="(Processing or Reporting) AND !ContentManagement">

Applies to:

CMS 9.0 Initial Release - 9.1 Initial Release

CMS 9.1 Update-1

January 02, 2020
January 02, 2020

Reference number:

203749, 205439, 205757, 256850, 256873