1

When I try to personalise an element within an email, I receive an error:

[IndexOutOfRangeException: Index was outside the bounds of the array.]
   Sitecore.Data.Query.Tokenizer.NextToken() +2090
   Sitecore.Data.Query.QueryParser.Initialize(String query) +126
   Sitecore.Data.Query.QueryParser.DoParse(String query) +17
   Sitecore.Data.Query.Query..ctor(String query) +70
   Sitecore.Data.Query.Query.SelectItems(String query, QueryContext contextNode, Database database) +94
   Sitecore.Data.DefaultDatabase.SelectItems(String query) +204
   Sitecore.XA.Foundation.LocalDatasources.Pipelines.GetRenderingDatasource.GetDatasourceLocation.AddRootsFromQuery(String query, GetRenderingDatasourceArgs args) +336
   Sitecore.XA.Foundation.LocalDatasources.Pipelines.GetRenderingDatasource.GetDatasourceLocation.Process(GetRenderingDatasourceArgs args) +226
   (Object , Object ) +9
   Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) +484
   Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain, Boolean failIfNotExists) +236
   Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain) +22
   Sitecore.Shell.Applications.WebEdit.Dialogs.Personalization.PersonalizationForm.SetDatasource(ClientPipelineArgs args) +890

I replicate this by setting the content field by clicking the '...' button: Content select button This triggers a call to /sitecore/shell/default.aspx?xmlcontrol=Sitecore.Shell.Applications.WebEdit.Dialogs.Personalization&shdl=PEPesonalization&deviceId=%7BFE5D7FDF-89C0-4D99-9AA3-B5FBD009C9F3%7D&uid=%7BF71D3F57-B8AB-48AC-8D72-EEF37982A3B8%7D&uri=sitecore%3A%2F%2Fmaster%2F%7BDEE175AA-88A2-4D14-BEFE-735049352DFC%7D%3Flang%3Den%26ver%3D0

DEE175AA-88A2-4D14-BEFE-735049352DFC being the Item at /sitecore/content/Email/Messages/2019/07/22T105128/test/Message Root

This is the call that is failing and causes a run time error dialog to appear. Clicking details fails to reveal more information. Has anyone come across this before?

I'm running the unmodified, Sitecore supplied Sitecore.NET 9.1.0 (rev. 001564) Habitat Home demo.

  • 1
    I think that the line Habitat Sitecore.XA.Foundation.LocalDatasources.Pipelines.GetRenderingDatasource.GetDatasourceLocation.AddRootsFromQuery requires a Sitecore site to find its bits. I wonder if that works with EXM. I would have to imagine it does, but. – Chris Auer Jul 25 at 14:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.