data-sly-call: expression evaluates to null | Community
Skip to main content
amrit1993
March 7, 2017
Solved

data-sly-call: expression evaluates to null

  • March 7, 2017
  • 13 replies
  • 11926 views

Hi all,

After migrating from 6.0 to 6.2 we are facing issues in opening some pages. They are being opened with an error:

Error during include of component '/apps/xyz/components/page/groupsmapping'

Error Message:

org.apache.sling.api.scripting.ScriptEvaluationException: org.apache.sling.scripting.sightly.SightlyException: data-sly-call: expression evaluates to null

Below is the HTML for it

groupsmapping.html:

 


    <head data-sly-use.clientLib="${'/apps/acs-commons/sightly/templates/dhlm.html'}"  data-sly-use.clientLib="${'/libs/granite/sightly/templates/clientlib.html'}">
        <div data-sly-include="/libs/wcm/core/components/init/init.jsp" data-sly-unwrap></div>
        <style data-sly-call="${clientLib.head @ mode='all'}" data-sly-unwrap></style>
        <style data-sly-call="${xyz.vendor @ mode='all'}" data-sly-unwrap></style>
    </head>
    <body>

        <div data-sly-resource="${ @path='groupsmapping', resourceType='xyz/components/content/groupsmappingconfig'}" data-sly-unwrap></div>
    </body>
</html>

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 amrit1993

I just commented out the data-sly-call tags and the pages started rendering. Need to debug more for root cause.

13 replies

Feike_Visser1
Adobe Employee
Adobe Employee
March 7, 2017

I see twice a declaration of 'clientLib', but no declaration for 'xyz' or 'dhlm'

March 7, 2017

Hello,

We also had similar issues going from 6.1 to 6.2. The issue was with some of our custom components / views, and the dev team had to update their code package to be compatible. Only pages using specific components or views had the issue. I would recommend turning on additional logging if the existing logs don't have enough detail to know which component / view is causing the issue, or you can't narrow it down otherwise. 

Andrew

Feike_Visser1
Adobe Employee
Adobe Employee
March 8, 2017

Can you create a sample so we can help you further?

ZeDor
March 10, 2017

We have a similar problem while migrating from AEM 6.1 JSP to Sightly in 6.2 - It is a simple call to the clientLib - Keeps on saying error in line no 1 in page.html

"data-sly-call: expression evaluates to null"

Here is my headlibs.html

<sly data-sly-use.clientLib="/libs/granite/sightly/templates/clientlib.html" 

    data-sly-call="${clientLib.css @ categories='app.header'}"/>

Can you please help?

Feike_Visser1
Adobe Employee
Adobe Employee
March 10, 2017

Are all components failing (like Geometrixx)?

Can try to split the markup into two lines?

Feike_Visser1
Adobe Employee
Adobe Employee
March 10, 2017

Just tested this on 6.2 SP1, works fine.

amrit1993
amrit1993AuthorAccepted solution
March 10, 2017

I just commented out the data-sly-call tags and the pages started rendering. Need to debug more for root cause.

Feike_Visser1
Adobe Employee
Adobe Employee
March 13, 2017

Any luck with finding the root cause?

amrit1993
amrit1993Author
March 20, 2017

nope, not till now.

ZeDor
March 20, 2017

Worked for us. There was an error in our UI engine. The CSS file that get some generated was empty. Works fine now. Just try loading some other CSS file and assign to a tag. We traced the error back to the CSS file