Skip to main content
amrit1993
Level 3
Mar 7, 2017 10:41 AM UTC
Solved

data-sly-call: expression evaluates to null

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.
amrit1993
amrit1993Accepted solution
Level 3
Mar 10, 2017 1:55 PM UTC

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
Mar 7, 2017 11:28 AM UTC

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

Translate
Level 2
Mar 7, 2017 4:22 PM UTC

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

Translate
Feike_Visser1
Adobe Employee
Adobe Employee
Mar 8, 2017 7:53 AM UTC

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

Translate
ZeDor
Level 2
Mar 10, 2017 4:39 AM UTC

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?

Translate
Feike_Visser1
Adobe Employee
Adobe Employee
Mar 10, 2017 7:12 AM UTC

Are all components failing (like Geometrixx)?

Can try to split the markup into two lines?

Translate
Feike_Visser1
Adobe Employee
Adobe Employee
Mar 10, 2017 1:45 PM UTC

Just tested this on 6.2 SP1, works fine.

Translate
amrit1993
amrit1993AuthorAccepted solution
Level 3
Mar 10, 2017 1:55 PM UTC

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

Translate
Feike_Visser1
Adobe Employee
Adobe Employee
Mar 13, 2017 8:16 PM UTC

Any luck with finding the root cause?

Translate
amrit1993
amrit1993Author
Level 3
Mar 20, 2017 11:17 AM UTC

nope, not till now.

Translate
ZeDor
Level 2
Mar 20, 2017 11:26 AM UTC

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

Translate