Expand my Community achievements bar.

Dynamic Media – Broken Links Issue

Avatar

8/29/23

Have you worked on integration of AEM Assets with Adobe Dynamic media Scene7? If so, you might have come across issue of broken links of Dynamic media Renditions at times.

This post talks about how to troubleshoot such issue.

How Broken link get generated in first place:

This happens if the Asset user removes the asset which has been synchronized with Dynamic media. At times, user/ organization perform this genuinely based on any possible business reasons. Other than those genuine scenarios, how does this anomaly happen?

 

This can happen if the organization sets the Dynamic media- General Settings – Upload Application – Overwrite images property with Overwrite in any folder, same base Asset name/ Extension and handle asset with same name across folders and both the folders are enabled for DM sync.  Let us understand this in detail with below steps.

  1. DAM User uploads asset A in /content/dam/folder_1
  2. As folder_1 is enabled for DM sync, system synchronizes the asset at DM on the upload of asset.
  3. So, at the end of these 2 steps, there is a 1 AEM Asset and 1 associated DM Asset with required URL.
  4. User copies Asset A and pastes at /content/dam/folder_2
  5. As folder_2 is enabled for DM sync, system tries to synchronize the asset at DM. It observes that asset with same name already exists in DM. So, it makes use of the overwrite image property mentioned in the general settings. If the property is set as overwrite in any folder, same base Asset name/ extension OR overwrite in any folder same base asset name regardless of extension, then Dynamic media would re-use the existing DM media asset. It would not create any new Dynamic media asset.
  6. So, now we have 2 AEM assets with same name(in different folders) and 1 associated DM asset.
  7. User deletes the asset from /content/dam/folder_1 or /content/dam/folder_2
  8. Delete event deletes 1 AEM asset and associated DM asset. But the other AEM asset remains without having the associated DM counterpart.

 

That results in broken DM link for that AEM asset.

And why does any organization follow the abovementioned steps? Well... it is quite possible that organizations  associated with Digital Assets would have business process where-in teams in-charge of asset ingestion , ingests the asset into some specific folders. Say content/dam/ingestion/<folder-by-calendar-date>.

 

And AEM workflows are usually setup in such environments which listens to these ingestion events, move them to the required folder, perform business processing etc.

 

Now, how to avoid such issues in DM?

  1. Ensure that Overwrite image property is set to Overwrite in current folder, same base name/extension. This would ensure that in the business process like above, DM would overwrite the asset only if the folder of the old and new asset remains the same. If folder of old and new asset is not the same, it would create duplicate asset in DM with nomenclature as <Assetname>-1

 

So, it would end up in having 1:1 mapping for AEM Asset & Associated DM asset. And this applicable for asset on both the folders. In that scenario, removal of asset from one folder does not break the Dynamic media URL.

 

In AEM CS : Click Assets / Dynamic media General Settings. It would show a screen like below.

If you are in AEM 6.5:  Below feature is available, only if

  1. It is 6.5.11 & above
  2. It is running in DM Scene 7 mode

 

venkat_sankaranarayanan_0-1693377712358.png

 

 

 

  1. But what if you do not want to duplicate asset name like <Assetname>-1/2/3, as it may not be the great user experience. In such case, you would need to set the overwrite image property as Overwrite in any folder, same base asset name/extension.  But we see that setting with this value results in broken links on DM, if one of the asset is removed.

 

How to handle this scenario? You can handle this by ensuring that only one of the folders are entitled for Dynamic media sync and not both. That means, asset ingested on that folder which is configured for DM sync would have the asset replicated to DM and asset on folder which is not configured for DM sync would not perform any replication. s

 

With that approach, you are ensuring that there is only 1-1 mapping between AEM and DM asset  unlike 2 AEM assets mapped to 1 DM asset of broken link scenario.

 

 

 

venkat_sankaranarayanan_1-1693377712367.png

 

Hope this is helpful.

Thanks!!

6 Comments