adobe / aem-core-wcm-components

Standardized components to build websites with AEM.
https://docs.adobe.com/content/help/en/experience-manager-core-components/using/introduction.html
Apache License 2.0
723 stars 737 forks source link

Download dialog showing invalid description from asset #2749

Open HitmanInWis opened 1 month ago

HitmanInWis commented 1 month ago

Bug present as of version: 2.24.7-SNAPSHOT

On the Download component dialog, if you select a DAM asset with a Title but no Description, the Title value is displayed in both the Title (correct) and Description (incorrect) fields when the checkboxes to default from DAM are selected. However, on closing the dialog, the Description on the component displays empty (b/c there is no actual description on the DAM Asset).

One solution is to simply update the dialog to no longer display the DAM Asset title in the Description field:

Bug File: /apps/core/wcm/components/download/v1/download/clientlibs/editor/js/download.js

Remove the following lines of code from the retrieveDAMInfo function:

                    if (description === undefined || description.trim() === "") {
                        description = data["dc:title"];
                    }

If, however, there is a valid reason to have the description default from the title, we'd need to instead update how the sling model calculates description.