Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Sightly OOTB Image component doesn't show preview in the dialog

Avatar

Level 3

The OOTB sightly image component (libs/wcm/foundation/components/image) does not render the image preview in dialog. Instead it just shows the file name when the dialog is reopened after initital upload.

However the classic version of image component found under libs/foundation/components/image works well. We have used the Sightly-image component and would like the same functionality with it as well. Is it a known issue ? Please help to resolve if there is already a fix available.

I have tried on a fresh copy of AEM 6.0 and observed the same behaviour in geometrix site as well.

Attaching both screenshots for OOTB- classic and touch ui Image components.

Thanks in Advance

-Sanjay

1 Accepted Solution

Avatar

Correct answer by
Level 2

I found the issue ... I don't know why but someone here modified the images.js script from the component in order to use "item.js" but there is no "item.js" and if I use instead "Image.js" it works ...

Sorry

View solution in original post

7 Replies

Avatar

Level 4

File a ticket and state feature request,

Avatar

Level 10

I have used OOTB image component, not sure about its behavior in 6.0 however it works perfect in 6.1

Try to install SP's for 6.0, you might get the fix for this. It seems to be a known issue and fix should be available easily. :)

Thanks

Avatar

Level 10

Hi,

As @edubey mentioned, 'image-sightly' component has the preview feature working properly on AEM 6.1 and 6.2 versions. 

AEM 6.0 is the first version with sigthly introduced and hence may have some issues like you have mentioned. Please raise a support ticket to get a new package / hotfix

Avatar

Administrator

I just tested it on 6.0, 6.1 and 6.2.

It is working on all of the instances. I just want to ask you did you made some changes to the component ? if so what are they?

is there any error coming in the browser and AEM error.log ?

~kautuk



Kautuk Sahni

Avatar

Level 2

Hi,

On my side it's worst, because the slightly image component along with slightly text image component don't work.

When I try to use those components I got a exception:

Caused by: org.apache.sling.scripting.sightly.SightlyException: javax.script.ScriptException: Failure running script /libs/wcm/foundation/components/image/image.js: Required script resource could not be located: /libs/wcm/foundation/components/utils/item.js. The caller is /libs/wcm/foundation/components/image/image.js

And of course I don't have any item.js in /libs/wcm/foundation/components/utils/

I don't understand why I don't have this file, on my AEM 6.2.0 install.

Do you have it ?

Avatar

Correct answer by
Level 2

I found the issue ... I don't know why but someone here modified the images.js script from the component in order to use "item.js" but there is no "item.js" and if I use instead "Image.js" it works ...

Sorry