sling-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Radu Cotescu (JIRA)" <>
Subject [jira] [Commented] (SLING-7882) HTL null pointer exception if resource type is not set with sling:resourceType
Date Thu, 23 May 2019 17:57:00 GMT


Radu Cotescu commented on SLING-7882:

[~kele23] , can you please provide me with the said content package if this is still an issue?

> HTL null pointer exception if resource type is not set with sling:resourceType
> ------------------------------------------------------------------------------
>                 Key: SLING-7882
>                 URL:
>             Project: Sling
>          Issue Type: Bug
>          Components: Scripting
>    Affects Versions: Scripting HTL Engine 1.0.54-1.4.0
>         Environment: ApacheSling/2.6 (jetty/9.3.22.v20171030, OpenJDK 64-Bit Server VM
1.8.0_172, Linux 4.16.3-301.fc28.x86_64 amd64)
>            Reporter: Michele Scala
>            Priority: Major
>              Labels: htl, nullpointerexception, scripting
>         Attachments: content.png, stack_trace.txt, with_sling_resource_type.png, without_sling_resource_type.png
> I've created a small content three with two pages. Every page have the jcr:primaryType
set to "kcs:Page" (a custom type that I've registered into repository).
> Under the "/apps/kcs/Page" i've created some HTL scripts, so now I expect that if I request
the page with my browser the scripts are executed using the resource type set in the primaryType
of the node; but it doesn't work.
> I've got a Null pointer exception (see stack trace as attachment) that I've find it is
caused by the missing of the "sling:resourceType" property.
> Trying with the sling:resourceType property set in the resource, the page works correctly. 
 Analyzing the issue more in depth I found that the problem is related to the presence of
some  "data-sly-include" inside the HTL code that if the "sling:resourceType" is missing
it doesn't work.

This message was sent by Atlassian JIRA

View raw message