Radu Cotescu created SLING-7589:
-----------------------------------
Summary: HTL doesn't correctly handle synthetic resource inclusions
Key: SLING-7589
URL: https://issues.apache.org/jira/browse/SLING-7589
Project: Sling
Issue Type: Bug
Components: Scripting
Reporter: Radu Cotescu
Assignee: Radu Cotescu
Fix For: Scripting HTL Engine 1.0.54-1.3.1
When a synthetic resource is included in a {{data-sly-resource}} block element
without any {{resourceType}} information, the HTL {{ResourceRuntimeExtension}}
will not correctly dispatch the request. In those cases the request's resource
type should be used as a fallback, to identify the correct scripts.
Example:
Assuming {{caller.html}}:
{noformat}
<div id="caller" data-sly-resource="${'/content/lorem-ipsum' @
resourceType='syntheticresource'}"></div>
{noformat}
and {{syntheticresource.html}}:
{noformat}
<div id="synthetic-resource">
<span class="wrapper-text">Testing synthetic resource delegation</span>
<div class="wrapper" data-sly-resource="${@ selectors='selector'}"></div>
</div>
{noformat}
results in the {{selector.html}} script not being found, due to not taking into
consideration the original resource type of the request.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)