5

We have DXA 1.5 running on SDL Tridion 2013 sp-1 and we are running into an issue anytime we try to render images within Articles. When we attempt to view any articles with images the presentation server gives us the "A problem occurred while rendering this section" notice. This occurs if the images are directly added to the article's Image field or if they are embedded within a paragraph's Media field.

Articles on the page without images render fine, even if they have an image within the RTF field.

The log file displays the following stack-trace:

ERROR - Unable to map field 'articleBody' to property of type 'Sdl.Web.Common.Models.Paragraph'. Sdl.Web.Common.DxaException: Unable to map field 'articleBody' to property of type 'Sdl.Web.Common.Models.Paragraph'. ---> System.ArgumentNullException: Value cannot be null. Parameter name: source at System.Linq.Enumerable.Select[TSource,TResult](IEnumerable1 source, Func2 selector) at DD4T.ContentModel.Field.DD4T.ContentModel.IField.get_EmbeddedValues() at Sdl.Web.Tridion.Mapping.DefaultModelBuilder.CreateViewModel(MappingData mappingData) in c:\DXA\dxa-web-application-dotnet-annual\Sdl.Web.Tridion\Mapping\DefaultModelBuilder.cs:line 308 at Sdl.Web.Tridion.Mapping.DefaultModelBuilder.MapEmbeddedFields(IFieldSet embeddedFields, Type modelType, MappingData mapData) in c:\DXA\dxa-web-application-dotnet-annual\Sdl.Web.Tridion\Mapping\DefaultModelBuilder.cs:line 654 at Sdl.Web.Tridion.Mapping.DefaultModelBuilder.MapFieldValues(IField field, Type modelType, Boolean multival, MappingData mapData) in c:\DXA\dxa-web-application-dotnet-annual\Sdl.Web.Tridion\Mapping\DefaultModelBuilder.cs:line 517 --- End of inner exception stack trace --- at Sdl.Web.Tridion.Mapping.DefaultModelBuilder.MapFieldValues(IField field, Type modelType, Boolean multival, MappingData mapData) in c:\DXA\dxa-web-application-dotnet-annual\Sdl.Web.Tridion\Mapping\DefaultModelBuilder.cs:line 563 at Sdl.Web.Tridion.Mapping.DefaultModelBuilder.CreateViewModel(MappingData mappingData) in c:\DXA\dxa-web-application-dotnet-annual\Sdl.Web.Tridion\Mapping\DefaultModelBuilder.cs:line 310 at Sdl.Web.Tridion.Mapping.DefaultModelBuilder.BuildEntityModel(EntityModel& entityModel, IComponent component, Type baseModelType, Localization localization) in c:\DXA\dxa-web-application-dotnet-annual\Sdl.Web.Tridion\Mapping\DefaultModelBuilder.cs:line 199 at Sdl.Web.Tridion.Mapping.DefaultModelBuilder.BuildEntityModel(EntityModel& entityModel, IComponentPresentation cp, Localization localization) in c:\DXA\dxa-web-application-dotnet-annual\Sdl.Web.Tridion\Mapping\DefaultModelBuilder.cs:line 153 at Sdl.Web.Tridion.Mapping.ModelBuilderPipeline.CreateEntityModel(IComponentPresentation cp, Localization localization) in c:\DXA\dxa-web-application-dotnet-annual\Sdl.Web.Tridion\Mapping\ModelBuilderPipeline.cs:line 100 at Sdl.Web.Tridion.Mapping.DefaultModelBuilder.BuildPageModel(PageModel& pageModel, IPage page, IEnumerable`1 includes, Localization localization) in c:\DXA\dxa-web-application-dotnet-annual\Sdl.Web.Tridion\Mapping\DefaultModelBuilder.cs:line 80

If we remove the images from this article it succeeds. Any ideas what would cause this kind of error?

2
  • 6
    Are you sure this is plain DXA 1.5? The line numbers in the stack trace don't correspond to meaningful lines in the source code: github.com/sdl/dxa-web-application-dotnet/blob/release/1.5/… Commented Feb 1, 2017 at 18:09
  • Did you try debugging it and see what error comes in the debug mode and why? To me it looks the model is not matching somehow with the data returned from the broker Commented Feb 2, 2017 at 14:28

2 Answers 2

6

Thanks to Rick's comment above we looked into our code. Somehow we pulled the wrong version of DXA (we were working on 1.1) when we added a custom area. After updating our code base to 1.5 and then adding our new Area, the issue went away. All versions of DXA are available on Github at https://github.com/sdl/dxa-web-application-dotnet

1

I have seen a similar issue however for that case, the issue was resolved after replacing offending Media Manager images with older images, and then updating/republishing components with the most recent linked images.

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.