1

I'm new to Coveo and it's integration into Sitecore. We're currnently in the process of upgrading a 9.2 instance to 10.3. The search was working, but was missing a few things when we compared with the existing production we're wanting to replace. We suspect the client has not provided us the latest repo, as we're missing a lot of little code pieces.

In my travels of setting up my local I didn't have coveo configured at all, and the search component in the header looked like this.

enter image description here

After I installed the Coveo package. "Coveo for Sitecore 10.3 5.0.1277.4.zip" provided by our MVP. I then needed to authorize the account and create a trial enterprise subscription for my local instance.

All this worked fine, but when I navigated back to the website. The failing component now looked as it was entended, and showed a search icon with search input. As soon as I attempted to search, I got this error YSOD show up. I'm not sure where to start here. enter image description here \Views\Coveo Hive\Sections\Results Header Section.cshtml Line: 5

From my understanding this is an out-of-box component that comes from the package. So, I navigated to the Coveo Diagnostic page and it states the versions are compatible.

enter image description here

Does anyone know what would be causing this? Have you seen it before? Where should I start looking?

Cheers

EDIT: Here is the stacktrace of the error, and it seems to be related to GlassMapper.

Full Stack Trace:

[NotSupportedException: The type Coveo.UI.Components.Models.IBaseComponentProperties on Coveo.UI.Components.Models.IBaseComponentProperties.Id is not supported by SitecoreIdMapper]
   Glass.Mapper.Sc.DataMappers.SitecoreIdMapper.Setup(DataMapperResolverArgs args) in D:\a\Glass.Mapper\Glass.Mapper\Source\Glass.Mapper.Sc\DataMappers\SitecoreIdMapper.cs:66
   Glass.Mapper.Pipelines.DataMapperResolver.Tasks.DataMapperStandardResolverTask.Execute(DataMapperResolverArgs args) in D:\a\Glass.Mapper\Glass.Mapper\Source\Glass.Mapper\Pipelines\DataMapperResolver\Tasks\DataMapperStandardResolverTask.cs:30
   Glass.Mapper.Pipelines.c__DisplayClass9_1.b__1(T args) in D:\a\Glass.Mapper\Glass.Mapper\Source\Glass.Mapper\Pipelines\AbstractPipelineRunner.cs:55
   Glass.Mapper.Pipelines.AbstractPipelineTask`1.Next(T args) in D:\a\Glass.Mapper\Glass.Mapper\Source\Glass.Mapper\Pipelines\AbstractPipelineTask.cs:33
   Glass.Mapper.Pipelines.DataMapperResolver.Tasks.DataMapperAttributeResolverTask.Execute(DataMapperResolverArgs args) in D:\a\Glass.Mapper\Glass.Mapper\Source\Glass.Mapper\Pipelines\DataMapperResolver\Tasks\DataMapperAttributeResolverTask.cs:34
   Glass.Mapper.Pipelines.c__DisplayClass9_0.b__0(T args) in D:\a\Glass.Mapper\Glass.Mapper\Source\Glass.Mapper\Pipelines\AbstractPipelineRunner.cs:65
   Glass.Mapper.Pipelines.AbstractPipelineRunner`2.Run(T args) in D:\a\Glass.Mapper\Glass.Mapper\Source\Glass.Mapper\Pipelines\AbstractPipelineRunner.cs:77
   Glass.Mapper.Context.ProcessProperties(IEnumerable`1 properties) in D:\a\Glass.Mapper\Glass.Mapper\Source\Glass.Mapper\Context.cs:204
   Glass.Mapper.Context.Load(IConfigurationLoader[] loaders) in D:\a\Glass.Mapper\Glass.Mapper\Source\Glass.Mapper\Context.cs:176
   Glass.Mapper.Pipelines.ConfigurationResolver.Tasks.OnDemandResolver.ConfigurationOnDemandResolverTask`1.Execute(ConfigurationResolverArgs args) in D:\a\Glass.Mapper\Glass.Mapper\Source\Glass.Mapper\Pipelines\ConfigurationResolver\Tasks\OnDemandResolver\ConfigurationOnDemandResolverTask.cs:26
   Glass.Mapper.Pipelines.c__DisplayClass9_1.b__1(T args) in D:\a\Glass.Mapper\Glass.Mapper\Source\Glass.Mapper\Pipelines\AbstractPipelineRunner.cs:55
   Glass.Mapper.Pipelines.AbstractPipelineTask`1.Next(T args) in D:\a\Glass.Mapper\Glass.Mapper\Source\Glass.Mapper\Pipelines\AbstractPipelineTask.cs:33
   Glass.Mapper.Pipelines.AbstractPipelineTask`1.Execute(T args) in D:\a\Glass.Mapper\Glass.Mapper\Source\Glass.Mapper\Pipelines\AbstractPipelineTask.cs:27
   Glass.Mapper.Pipelines.ConfigurationResolver.Tasks.StandardResolver.ConfigurationStandardResolverTask.Execute(ConfigurationResolverArgs args) in D:\a\Glass.Mapper\Glass.Mapper\Source\Glass.Mapper\Pipelines\ConfigurationResolver\StandardResolver\ConfigurationStandardResolverTask.cs:23
   Glass.Mapper.Pipelines.c__DisplayClass9_1.b__1(T args) in D:\a\Glass.Mapper\Glass.Mapper\Source\Glass.Mapper\Pipelines\AbstractPipelineRunner.cs:55
   Glass.Mapper.Pipelines.AbstractPipelineTask`1.Next(T args) in D:\a\Glass.Mapper\Glass.Mapper\Source\Glass.Mapper\Pipelines\AbstractPipelineTask.cs:33
   Glass.Mapper.Pipelines.AbstractPipelineTask`1.Execute(T args) in D:\a\Glass.Mapper\Glass.Mapper\Source\Glass.Mapper\Pipelines\AbstractPipelineTask.cs:27
   Glass.Mapper.Sc.Pipelines.ConfigurationResolver.TemplateInferredTypeTask.Execute(ConfigurationResolverArgs args) in D:\a\Glass.Mapper\Glass.Mapper\Source\Glass.Mapper.Sc\Pipelines\ConfigurationResolver\TemplateInferredTypeTask.cs:60
   Glass.Mapper.Pipelines.c__DisplayClass9_1.b__1(T args) in D:\a\Glass.Mapper\Glass.Mapper\Source\Glass.Mapper\Pipelines\AbstractPipelineRunner.cs:55
   Glass.Mapper.Pipelines.AbstractPipelineTask`1.Next(T args) in D:\a\Glass.Mapper\Glass.Mapper\Source\Glass.Mapper\Pipelines\AbstractPipelineTask.cs:33
   Glass.Mapper.Pipelines.AbstractPipelineTask`1.Execute(T args) in D:\a\Glass.Mapper\Glass.Mapper\Source\Glass.Mapper\Pipelines\AbstractPipelineTask.cs:27
   Glass.Mapper.Sc.Pipelines.ConfigurationResolver.SitecoreItemResolverTask.Execute(ConfigurationResolverArgs args) in D:\a\Glass.Mapper\Glass.Mapper\Source\Glass.Mapper.Sc\Pipelines\ConfigurationResolver\SitecoreItemResolverTask.cs:36
   Glass.Mapper.Pipelines.c__DisplayClass9_0.b__0(T args) in D:\a\Glass.Mapper\Glass.Mapper\Source\Glass.Mapper\Pipelines\AbstractPipelineRunner.cs:65
   Glass.Mapper.Pipelines.AbstractPipelineRunner`2.Run(T args) in D:\a\Glass.Mapper\Glass.Mapper\Source\Glass.Mapper\Pipelines\AbstractPipelineRunner.cs:77
   Glass.Mapper.AbstractService.RunConfigurationPipeline(AbstractTypeCreationContext abstractTypeCreationContext) in D:\a\Glass.Mapper\Glass.Mapper\Source\Glass.Mapper\AbstractService.cs:163
   Glass.Mapper.AbstractService.InstantiateObject(AbstractTypeCreationContext abstractTypeCreationContext) in D:\a\Glass.Mapper\Glass.Mapper\Source\Glass.Mapper\AbstractService.cs:126
   Glass.Mapper.Sc.SitecoreService.RunCreateType(Item item, GetOptions options, Dictionary`2 parameters) in D:\a\Glass.Mapper\Glass.Mapper\Source\Glass.Mapper.Sc\SitecoreService.cs:349
   Glass.Mapper.Sc.SitecoreService.GetItem(GetItemOptions options) in D:\a\Glass.Mapper\Glass.Mapper\Source\Glass.Mapper.Sc\SitecoreService.cs:338
   Glass.Mapper.Sc.Pipelines.Response.GetModelFromView.GetDataSourceItem(GetModelArgs args, Type modelType) in D:\a\Glass.Mapper\Glass.Mapper\Source\Glass.Mapper.Sc.Mvc\Pipelines\Response\GetModelFromView.cs:174
   Glass.Mapper.Sc.Pipelines.Response.GetModelFromView.Process(GetModelArgs args) in D:\a\Glass.Mapper\Glass.Mapper\Source\Glass.Mapper.Sc.Mvc\Pipelines\Response\GetModelFromView.cs:82
   (Object , Object ) +54
   Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) +1268
   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.Mvc.Pipelines.PipelineService.RunPipeline(String pipelineName, TArgs args) +195
   Sitecore.Mvc.Pipelines.PipelineService.RunPipeline(String pipelineName, TArgs args, Func`2 resultGetter) +161
   Sitecore.Mvc.Presentation.Rendering.GetModel() +316
   Sitecore.Mvc.Presentation.Rendering.get_Model() +31
   Sitecore.Mvc.Extensions.ObjectExtensions.ValueOrDefault(T source, Func`2 resultGetter) +51
   Sitecore.Mvc.Presentation.ViewRenderer.get_Model() +163
   Sitecore.Mvc.Presentation.ViewRenderer.Render(TextWriter writer) +160

enter image description here

6
  • 1
  • All the stack traces and error messages should be provided as text, not as screenshots
    – Marek Musielak
    Jan 17 at 10:38
  • @GauravAgarwal I had a look, I believe that person is stuck on something else. I have the search box displaying fine, the error shows once I press enter, and search.
    – Anthony
    Jan 17 at 22:54
  • @MarekMusielak I have added the full stack track to the post now.
    – Anthony
    Jan 17 at 22:55
  • @MarekMusielak If you're going to close the question, at least suggest where I can go to ask the question. Absolutely not helpful at all. Meant to be supporting the community here.
    – Anthony
    Jan 18 at 0:25

1 Answer 1

2

In the end, I peeked into the Coveo.UI.Components.Models.IBaseComponentProperty and noticed Id was a string, and GlassMapper uses reflection to work out where to send the code for processing.

Coveo.UI.Components.Models.IBaseComponentProperty

When I looked at the Glass.Mapper.Sc.DataMappers.SitecoreIdMapper I can see it trying to look for a type of ID or GUID. Since it was forced to be a string, it would throw the NotSupportedException. So the answer was to parse the ID type with custom code between these 2 libraries, and making sure it was a type of GUID. Unfortunately, the location of this custom code will differ per-project. So if you get this error, you'll need to work out where they talk and put that parse code in (new Guid(IBaseComponentProperty.Id);).

enter image description here

Hope that helps.

Your Answer

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

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