[
https://issues.apache.org/jira/browse/SLING-6094?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15545283#comment-15545283
]
Radu Cotescu commented on SLING-6094:
-------------------------------------
What version of the scripting engine are you using?
> HTL Parser NPE when using data-sly-attribute map and a static attribute with
> colon
> ----------------------------------------------------------------------------------
>
> Key: SLING-6094
> URL: https://issues.apache.org/jira/browse/SLING-6094
> Project: Sling
> Issue Type: Bug
> Components: Scripting
> Reporter: Mark J. Becker
>
> If you have a tag with an attribute name that has a colon and we use
> data-sly-attribute with a map variance (value is a map), we get a NPE and a
> cryptic stack trace.
> h3. sample.html
> {code}
> <div data-sly-use.logic="test.js">
> ${logic.hello.hello}
> <img src="" v-bind:src="abc" data-sly-attribute="${logic.hello}" />
> </div>
> {code}
> h3. test.js
> {code}
> use(function () {
> var message = "Hello World";
> return {
> // anything exposed here can be used inside your template
> hello: {hello: message}
> };
> });
> {code}
> h3. Stack Trace
> {code}
> 04.10.2016 14:47:55.460 *ERROR* [0:0:0:0:0:0:0:1 [1475585275441] GET
> /content/sample.html HTTP/1.1]
> org.apache.sling.engine.impl.SlingRequestProcessorImpl service: Uncaught
> SlingException
> org.apache.sling.scripting.sightly.impl.compiler.CompilerException:
> java.lang.NullPointerException
> at
> org.apache.sling.scripting.sightly.impl.compiler.SightlyJavaCompilerService.compileSource(SightlyJavaCompilerService.java:148)
> at
> org.apache.sling.scripting.sightly.impl.engine.UnitLoader.createUnit(UnitLoader.java:101)
> at
> org.apache.sling.scripting.sightly.impl.engine.SightlyScriptEngine.evaluateScript(SightlyScriptEngine.java:91)
> at
> org.apache.sling.scripting.sightly.impl.engine.SightlyScriptEngine.eval(SightlyScriptEngine.java:78)
> at
> org.apache.sling.scripting.core.impl.DefaultSlingScript.call(DefaultSlingScript.java:388)
> at
> org.apache.sling.scripting.core.impl.DefaultSlingScript.eval(DefaultSlingScript.java:184)
> ... shortened
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)