Publishing fails if I add images in component which are not azure synced yet. When I replace the images with azure sync ones, publishing/previewing works fine. It's a DD4T based application.

I can see the following error log in Tridion event viewer or template builder (Same in ECL logs):

Debugging was started in process 'TcmTemplateDebugHost' with id 39800
GeneralUtils: 230055.4173 - started Transform
ComponentBuilder: start BuildComponent with component Smart continence - Simple box - 82 (tcm:145-17395-v0) and link level 5
FieldBuilder: found component link field named internal_link with global followLinksPerField property set to false OR followLink set to true for this field
ComponentBuilder: start BuildComponent with component Breathable - Page intro (tcm:145-16924) and link level 4
FieldBuilder: found component link field named ImageVideo with global followLinksPerField property set to false OR followLink set to true for this field
ComponentBuilder: start BuildComponent with component ecl:0-cel-4308-image-file (tcm:145-16381) and link level 3
EclProcessor: Retrieving ECL item for ECL Stub Component: tcm:145-16381
EclProcessor: Retrieved ECL item for ECL Stub Component 'tcm:145-16381': ecl:145-cel-4308-image-file
Object reference not set to an instance of an object.
   at DD4T.Templates.Base.Utils.EclProcessor.PublishBinaryContent(IContentLibraryMultimediaItem eclItem, String eclStubComponentId) in C:\projects\dd4t-tridiontemplates\source\DD4T.Templates.Base\Utils\BinaryPublisher.cs:line 203
   at DD4T.Templates.Base.Utils.EclProcessor.ProcessEclStubComponent(Component eclStubComponent) in C:\projects\dd4t-tridiontemplates\source\DD4T.Templates.Base\Utils\BinaryPublisher.cs:line 106
   at DD4T.Templates.Base.Utils.BinaryPublisher.PublishMultimediaComponent(Component mmComponent, BuildProperties buildProperties) in C:\projects\dd4t-tridiontemplates\source\DD4T.Templates.Base\Utils\TridionConfigurationManager.cs:line 87
   at DD4T.Templates.Base.Builder.ComponentBuilder.BuildComponent(Component tcmComponent, Int32 currentLinkLevel, BuildManager manager) in C:\projects\dd4t-tridiontemplates\source\DD4T.Templates.Base\Builder\KeywordBuilder.cs:line 33
   at DD4T.Templates.Base.Builder.BuildManager.BuildComponent(Component tcmComponent, Int32 currentLinkLevel) in C:\projects\dd4t-tridiontemplates\source\DD4T.Templates.Base\Builder\BuildProperties.cs:line 30
   at DD4T.Templates.Base.Builder.FieldBuilder.BuildField(ItemField tcmItemField, Int32 currentLinkLevel, BuildManager manager) in :line 0

I checked images, I don't see anything wrong with the images apart from no CDN path, but it should be ok, right? At least it should allow it to publish it however we would see an empty image on site.

1 Answer 1


When an ECL item is being published, the method ProcessEclStubComponent() from DD4T.Templates.Base.Utils.EclProcessor is being called to determine if there is a direct link to the ECL item (the result from IContentLibraryMultimediaItem.GetDirectLinkToPublished()), or if the ECL item needs to be published (by calling IContentLibraryMultimediaItem.GetContent())

In your stacktrace we can see the method DD4T.Templates.Base.Utils.EclProcessor.PublishBinaryContent() being called, which call in turn the GetContent() method of your ECL item.

You fail to mention what type of ECL Provider is being used, but what we do know is that IContentLibraryMultimediaItem.GetDirectLinkToPublished() has returned either null or an empty string, so the IContentLibraryMultimediaItem.GetContent() method is called and it seems that generates an error.

You mention this only happens on images which don't have a CDN path yet. In that case I would expect their GetContent() method to return the actual image so it can be previewed/published, or maybe they should always return some URL to a non existing image (since you mention you expect to see an empty image). From what I can determine based on the (limited) information given, the issue is in the ECL provider, as that is where the error seems to be thrown from.

  • Thanks @bart koopman for this usefull info, i will check ECL Provider on monday , just wanted to add one thing that it was working fine for all images when i have verson 2.1.0 of DD4T.Template.Merged dll, but when i replaced it with 2.2.0 version of DD4T.Template.Merged it stopped working. Jun 30, 2017 at 16:43
  • @NeeleshRaghuvanshi the change I can see between those versions is the introduction of a empty list to prevent nullreference exceptions (github.com/dd4t/DD4T.TridionTemplates/blob/2.2.0/source/…). Again something which is handled in the ECL provider code, with the information given I'm still suspecting your ECL provider to be causing your issue. Jul 3, 2017 at 9:16

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.