6

I am new to DD4T framework. I just start working on DD4T 3 months ago. In DD4T all images published to Broker DB and when its requested then it's been accessed from Broker and cached in BinaryData Folder. BinaryData is auto generated folder in which all images cached in respective publication path ( aa, bb,cc...).

Now Problem is that wrong paths are created in BinaryData folder. In Broker we have an image path like aa\images\img1.png, but in BinaryData folder it is adding publication path multiple times. For example like \aa\aa\images\img1.png or **\aa\aa\aa\images\img1.png*. Sometimes 'BinaryData' Data folder is created again in 'BinaryData'.

Can anyone help me what should be the cause of the issue?

3
  • is it resolved?
    – Raj Kumar
    Apr 25, 2017 at 10:00
  • Believe it was resolved.. If yes, please put an answer to this question. If not, Which version of Tridion are you using? May 1, 2017 at 14:39
  • What version of Tridion and DD4T are you using? Did you customize the cache invalidation logic in DD4T, by any chance?
    – Shiva
    May 31, 2017 at 15:56

2 Answers 2

5

This is a known issue in DD4T. The root cause is that a non-existing image was requested. When somebody tries to access a non-existing image url (in a non-existing folder), the BinaryFactory creates the new directory first, and puts an empty placeholder file inside it. If the image does not exist in the broker, the factory performs a cleanup by deleting the placeholder file but leaving the directory structure as is.

The issue has been fixed. The latest DD4T version now cleans up more thoroughly by deleting the placeholder file and recursively deleting the directory structure.

Updating DD4t.Core to 2.2.7.180-alpha or later will solve the issue.

1

To me, It seems your Publication properties is meshed up, if it's Web8, try to look at the Get-ttmMapping and your RelativeUrls, basically if that's not set properly it should not allow you to save your publication publishing properties.

The default behavior in DXA is to get the GetBinaryMeta() and create a BinaryData folder using WriteBinaryToFile() where localpath is retrieved using urlPath & localization value.

See below:

string localFilePath = $"{baseDir}/{localization.BinaryCacheFolder}/{urlPath}";

So look at the urlpath of your image in environment and validate if your Image path is set properly, there is no reason why this would show up multiple folders inside BinaryData unless your urls path is wrong.

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.