2

We are using SDL Web 8.5 and DXA 2.0. While publishing some Components they are failing on rendering stage. After debugging using Template Builder we are getting below error:

Debugging was started in process 'TcmTemplateDebugHost' with id 6924
GenerateEntityModel: Transform
GenerateEntityModel: includeComponentTemplateData: ''
GenerateEntityModel: expandLinkDepth: '1'
DataModelBuilderPipeline: Using Page Model Builder type 'Sdl.Web.Tridion.Templates.R2.Data.DefaultModelBuilder'.
DataModelBuilderPipeline: Using Entity Model Builder type 'Sdl.Web.Tridion.Templates.R2.Data.DefaultModelBuilder'.
DataModelBuilderPipeline: Using Keyword Model Builder type 'Sdl.Web.Tridion.Templates.R2.Data.DefaultModelBuilder'.
DataModelBuilderPipeline: Using Entity Model Builder type 'Sdl.Web.Tridion.Templates.R2.Data.EclModelBuilder'.
DefaultModelBuilder: BuildEntityModel(Component tcm:23-7517, ComponentTemplate tcm:22-664-32, 1)
DefaultModelBuilder: Encountered XLink '/ProductsContent/sectionTitle' -> Keyword tcm:23-684-1024
DefaultModelBuilder: Not expanding Keyword link because its Category is publishable: Category 'Products - Sections Heading' (tcm:23-124-512)
An error occurred while rendering Component '002 - Benefits' (tcm:23-7517) with ComponentTemplate 'Products Content - One Column List' (tcm:22-664-32-v0)
   at Sdl.Web.Tridion.Templates.R2.Templates.GenerateEntityModel.Transform(Engine engine, Package package)
   at Tridion.ContentManager.Templating.Assembly.AssemblyMediator.Transform(Engine engine, Template template, Package package)
   at Tridion.ContentManager.Templating.Assembly.CSharpSourceCodeMediator.RunTemplate(Engine engine, Package package, String templateUri, String className)
   at Tridion.Templating.CSharpTemplate.CSharpSourceTemplate.Transform(Engine __engine, Package __package)
   at Tridion.ContentManager.Templating.Assembly.CSharpSourceCodeMediator.Transform(Engine engine, Template template, Package package)
   at Tridion.ContentManager.Templating.Engine.ExecuteTemplate(Template template, Package package)
   at Tridion.ContentManager.Templating.Engine.InvokeTemplate(Package package, TemplateInvocation templateInvocation, Template template)
   at Tridion.ContentManager.Templating.Compound.CompoundTemplateMediator.Transform(Engine engine, Template templateToTransform, Package package)
   at Tridion.ContentManager.Templating.Engine.ExecuteTemplate(Template template, Package package)
   at Tridion.ContentManager.Templating.Engine.InvokeTemplate(Package package, TemplateInvocation templateInvocation, Template template)
   at Tridion.ContentManager.Templating.Compound.CompoundTemplateMediator.Transform(Engine engine, Template templateToTransform, Package package)
   at Tridion.ContentManager.Templating.Engine.ExecuteTemplate(Template template, Package package)
   at Tridion.ContentManager.Templating.Engine.InvokeTemplate(Package package, TemplateInvocation templateInvocation, Template template)
   at Tridion.ContentManager.Templating.Engine.TransformPackage(Template template, Package package)
   at Tridion.ContentManager.Templating.Engine.TransformItem(Template template, IdentifiableObject itemToRender)
   at Tridion.ContentManager.Templating.Debugging.DebuggingEngine.Run()
   at Tridion.ContentManager.Templating.Debugging.DebugSession.Run()
---Caused by:
Object cannot be stored in an array of this type.
   at System.Array.InternalSetValue(Void* target, Object value)
   at System.Array.SetValue(Object value, Int32 index)
   at Sdl.Web.Tridion.Templates.R2.Data.DataModelBuilder.GetTypedArrayOfValues[T](List`1 fieldValues)
   at Sdl.Web.Tridion.Templates.R2.Data.DataModelBuilder.BuildContentModel(XmlElement xmlElement, Int32 expandLinkDepth)
   at Sdl.Web.Tridion.Templates.R2.Data.DataModelBuilder.GetFieldValue(XmlElement xmlElement, Int32 expandLinkDepth)
   at Sdl.Web.Tridion.Templates.R2.Data.DataModelBuilder.BuildContentModel(XmlElement xmlElement, Int32 expandLinkDepth)
   at Sdl.Web.Tridion.Templates.R2.Data.DefaultModelBuilder.BuildEntityModel(EntityModelData& entityModelData, Component component, ComponentTemplate ct, Boolean includeComponentTemplateDetails, Int32 expandLinkDepth)
   at Sdl.Web.Tridion.Templates.R2.Data.DataModelBuilderPipeline.CreateEntityModel(Component component, ComponentTemplate ct, Boolean includeComponentTemplateDetails, Nullable`1 expandLinkDepth)
   at Sdl.Web.Tridion.Templates.R2.Templates.GenerateEntityModel.Transform(Engine engine, Package package)

We have noticed that the issue is only happening when we put HTML content inside multi value RichText field.

UPDATE

We have a schema with a Text field in which Allow Multiple Values & Allow Rich Text Formatting is selected. When we create a component and fill a rich text like bold text in that field publishing or preview component is failing with error “Object cannot be stored in an array of this type.” The publishing is only failing when we fill rich text field.

source of an example component

<ProductsContent xmlns="uuid:d62020d9-e7f5-4323-9ea5-126b8e528bf8">
    <sectionTitle xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="tcm:23-684-1024" xlink:title="Benefits">Benefits</sectionTitle>
    <fullContent xmlns="uuid:d62020d9-e7f5-4323-9ea5-126b8e528bf8">
        <paraContent>Now, you can apply for a <strong xmlns="http://www.w3.org/1999/xhtml">car</strong> loan through the website.</paraContent>
        <paraContent xmlns="uuid:d62020d9-e7f5-4323-9ea5-126b8e528bf8">
Ease of applying for car loan though recognized locations.</paraContent>
        <paraContent xmlns="uuid:d62020d9-e7f5-4323-9ea5-126b8e528bf8">
Loan amount up to KD 15,000 with flexible repayment terms</paraContent>
    </fullContent>
</ProductsContent>

enter image description here

  • Can you edit your question and add the details of the HTML content that is causing this exactly? – Bart Koopman Apr 3 '18 at 11:46
  • @BartKoopman i have updated the question. – Abdul Qadir Apr 3 '18 at 13:27
  • You mentioned “multi value RichText field”. Do all values have HTML content? – Rick Pannekoek Apr 3 '18 at 20:37
  • @Rick no only value have HTML content. – Abdul Qadir Apr 4 '18 at 17:43
  • @Bart i have also noticed that if i put any html content like anchor tag that will cause same issue – Abdul Qadir Apr 4 '18 at 17:45

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.