Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Page breaks when i delete an asset

kbhalla22
Level 1
Level 1

Hi, when I try to delete an asset from a page that is published or (view as published). The page breaks and I get an exception. However, what i want to do is to display an error image thumbnail or something else over there(in the image component). Any idea how to achieve that?

 

this is the error that i am getting when i delete an asset : 

org.apache.sling.scripting.sightly.SightlyException: org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: org.mozilla.javascript.EcmaError: TypeError: Cannot call method "adaptTo" of null (/apps/myproject/components/content/image/asset.js#11)

0 Replies