Coveo for Sitecore 5 is now available!

Empty Strings Are Not Allowed Exception Occurring When Specifying Creator-Owner Permissions

Coveo for Sitecore 4.1 (August 2018)

Symptoms

After assigning the Creator-Owner role on an item and leaving the Created by field either empty or inherited from the __Standard Values template, the item is skipped during indexing time. In the <YourSitecoreInstance>/Data/logs folder, in the generated log.<date-reference>.txt file, you get the following error:

ManagedPoolThread #19 15:29:55 ERROR Item {78D45606-5757-4807-89A0-55B220337651} will be skipped because an exception occurred while processing it. An exception occurred when processing the item with the id : {78D45606-5757-4807-89A0-55B220337651}
Exception: Coveo.Framework.Exceptions.InvalidItemException
Message: An exception occurred when processing the item with the id : {78D45606-5757-4807-89A0-55B220337651}
Source: Coveo.SearchProviderBase
   at Coveo.SearchProvider.Documents.AbstractDocumentFactory.TryBuildDocument(Action p_Action, IIndexable p_Indexable)
   at Coveo.SearchProvider.Documents.DocumentFactory.CreateIndexableItem(IIndexable p_Indexable, IPipelineArgsFactory p_PipelineArgsFactory, PropertyStoreConfig p_PropertyStoreConfig)
   at Coveo.SearchProvider.AbstractIndexOperations.<GetDocumentsToIndex>d__1c.MoveNext()
Nested Exception
Exception: System.ArgumentException
Message: Empty strings are not allowed.
Parameter name: accountName
Source: Sitecore.Kernel
   at Sitecore.Diagnostics.Assert.ArgumentNotNullOrEmpty(String argument, String argumentName)
   at Sitecore.Security.Accounts.Account.FromName(String accountName, AccountType accountType)
   at Coveo.SearchProvider.Documents.AccountFactory.GetAccountAccordingToItem(IAccount p_Account, IItemSecurity p_Item)
   at Coveo.SearchProvider.Documents.AccessRulesHierarchyFactory.GetIndexableRulesFromAccessRules(IItemSecurity p_ItemSecurity)
   at Coveo.SearchProvider.Documents.AccessRulesHierarchyFactory.GetItemSecurityDetails(IItem p_Item)
   at Coveo.SearchProvider.Documents.AccessRulesHierarchyFactory.CreateAccessRulesHierarchy(IItem p_Item)
   at Coveo.SearchProvider.Documents.DocumentBuilder.LoadPermission(IIndexableWrapper p_SitecoreIndexableItem, CoveoIndexableItem p_CoveoIndexableItem)
   at Coveo.SearchProvider.Documents.DocumentBuilder.AddPermissions()
   at Coveo.SearchProvider.Documents.DocumentFactory.<>c__DisplayClass8.<CreateIndexableItem>b__7()
   at Coveo.SearchProvider.Documents.AbstractDocumentFactory.TryBuildDocument(Action p_Action, IIndexable p_Indexable)

Cause

A Coveo for Sitecore issue prevents the Creator-Owner role value from being set.

Resolution

This issue is fixed in the August 2018 releases of Coveo for Sitecore 4.0 and Coveo for Sitecore 4.1. You are thus encouraged to update to the latest version.

If you cannot upgrade, there are two workarounds for this issue:

  • Remove the Creator-Owner role from the list of roles and users assigned to the item and use another comparable role instead.
  • Directly set the value of the Created by field on your item to a value other than the one specified in the __Standard Value of the associated template.