Skip to main content
Tweeted twitter.com/StackTridion/status/827241952710127618
edited tags
Link
Rick Pannekoek
  • 21.4k
  • 1
  • 18
  • 30
Source Link

DXA Failing to Map Images

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?