Problem while including asset details components in initial content | Community
Skip to main content
July 5, 2022
Solved

Problem while including asset details components in initial content

  • July 5, 2022
  • 2 replies
  • 663 views

Hi ,

I am trying to create details page template of asset share commons in my maven project for that what i did is I copied details page template type from /conf/asset-share-commons/settings/wcm/template-types/details-page to my project(/conf/my-asset-share/settings/wcm/template-types/details-page)

 

Then I created Details Page template in my project for this template I added policies under structure then after I tried to add some components under Initial content when I try to add details components(asset share commons - details) its throwing errors like this 

In logs I found this error

 *ERROR* [0:0:0:0:0:0:0:1 [1657017722129] GET /conf/my-asset-share/settings/wcm/templates/asset-deatails-template-for-my-asset-share-project/initial/jcr:content/root/main/responsivegrid/title.html HTTP/1.1] com.day.cq.wcm.core.impl.WCMDebugFilter Exception: Cannot get DefaultSlingScript: data-sly-call: expression evaluates to null.
org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: data-sly-call: expression evaluates to null.
    at org.apache.sling.scripting.core.impl.DefaultSlingScript.service(DefaultSlingScript.java:510) [org.apache.sling.scripting.core:2.0.56]
    at org.apache.sling.engine.impl.request.RequestData.service(RequestData.java:552) [org.apache.sling.engine:2.6.18]
    at org.apache.sling.engine.impl.filter.SlingComponentFilterChain.render(SlingComponentFilterChain.java:44) [org.apache.sling.engine:2.6.18]
    at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:82) [org.apache.sling.engine:2.6.18]
    at com.day.cq.wcm.core.impl.WCMDebugFilter.doFilterWithErrorHandling(WCMDebugFilter.java:192) [com.day.cq.wcm.cq-wcm-core:5.12.90]
    at com.day.cq.wcm.core.impl.WCMDebugFilter.doFilter(WCMDebugFilter.java:159) [com.day.cq.wcm.cq-wcm-core:5.12.90]
    at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:72) [org.apache.sling.engine:2.6.18]
    at com.day.cq.wcm.core.impl.WCMComponentFilter.doFilter(WCMComponentFilter.java:278) [com.day.cq.wcm.cq-wcm-core:5.12.90]
    at com.day.cq.wcm.core.impl.WCMComponentFilter.filterRootInclude(WCMComponentFilter.java:373) [com.day.cq.wcm.cq-wcm-core:5.12.90]
    at com.day.cq.wcm.core.impl.WCMComponentFilter.doFilter(WCMComponentFilter.java:190) [com.day.cq.wcm.cq-wcm-core:5.12.90]
    at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:72) [org.apache.sling.engine:2.6.18]
    at com.day.cq.wcm.core.impl.page.PageLockFilter.doFilter(PageLockFilter.java:91) [com.day.cq.wcm.cq-wcm-core:5.12.90]
    at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:72) [org.apache.sling.engine:2.6.18]
    at com.day.cq.personalization.impl.TargetComponentFilter.doFilter(TargetComponentFilter.java:94) [com.day.cq.cq-personalization:5.12.36]
    at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:72) [org.apache.sling.engine:2.6.18]
    at org.apache.sling.engine.impl.SlingRequestProcessorImpl.processComponent(SlingRequestProcessorImpl.java:282) [org.apache.sling.engine:2.6.18]
    at org.apache.sling.engine.impl.filter.RequestSlingFilterChain.render(RequestSlingFilterChain.java:49) [org.apache.sling.engine:2.6.18]
    at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:76) [org.apache.sling.engine:2.6.18]
    at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:78) [org.apache.sling.engine:2.6.18]
    at com.day.cq.wcm.core.impl.warp.TimeWarpFilter.doFilter(TimeWarpFilter.java:109) [com.day.cq.wcm.cq-wcm-core:5.12.90]
 
Thanks, 
Vani.

 

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by lukasz-m

Hi @Vani1012,

The issue is related to missing asset context. The same behavior can be seen on original Asset Details template that you get with Asset Share Commons. Asset context can be set adding path to asset as a suffix.

You can find more details in following thread/message:

Other thing that could be be worth to have a look is documentation about details page, to understand how it works:

2 replies

Anmol_Bhardwaj
Community Advisor
Community Advisor
July 7, 2022

From the error logs, it looks like there is a data-sly-call to a template/html file which is not present when you copied over. ( /title from the looks of it )

 

I would suggest you look into the html file for title, or paste the full error log trace, it would surely contain the exact line where the object is null.

lukasz-m
Community Advisor
lukasz-mCommunity AdvisorAccepted solution
Community Advisor
July 12, 2022

Hi @Vani1012,

The issue is related to missing asset context. The same behavior can be seen on original Asset Details template that you get with Asset Share Commons. Asset context can be set adding path to asset as a suffix.

You can find more details in following thread/message:

Other thing that could be be worth to have a look is documentation about details page, to understand how it works: