From 6b0b18483cf3932ab322c7b709b552d7192141ac Mon Sep 17 00:00:00 2001 From: Egor_Cheptsov Date: Mon, 27 May 2024 00:15:33 +0200 Subject: [PATCH] [SITES-21939] Alt Text not persisting in Page Properties for Featured Image --- .../image/v3/image/clientlibs/editor/js/image.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/content/src/content/jcr_root/apps/core/wcm/components/image/v3/image/clientlibs/editor/js/image.js b/content/src/content/jcr_root/apps/core/wcm/components/image/v3/image/clientlibs/editor/js/image.js index 1322beb5ad..40ac63156c 100644 --- a/content/src/content/jcr_root/apps/core/wcm/components/image/v3/image/clientlibs/editor/js/image.js +++ b/content/src/content/jcr_root/apps/core/wcm/components/image/v3/image/clientlibs/editor/js/image.js @@ -396,9 +396,13 @@ // we need to get saved value of 'smartCropRendition' of Core Image component smartCropRenditionFromJcr = data["smartCropRendition"]; } + if (filePath.endsWith("/cq:featuredimage")) { + remoteFileReference = data["fileReference"]; + } // we want to call retrieveDAMInfo after loading the dialog so that saved smartcrop rendition of remote asset - // can be shown on initial load. - if (remoteFileReference && remoteFileReference !== "" && remoteFileReference.includes("urn:aaid:aem")) { + // can be shown on initial load. Also adding condition filePath.endsWith("/cq:featuredimage") to trigger alt + // update for page properties. + if (remoteFileReference && remoteFileReference !== "" && (remoteFileReference.includes("urn:aaid:aem") || filePath.endsWith("/cq:featuredimage"))) { retrieveDAMInfo(remoteFileReference); } });