You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Radu Cotescu (Jira)" <ji...@apache.org> on 2020/08/21 11:16:00 UTC

[jira] [Updated] (SLING-9657) Same-name JS Use dependencies are not always correctly resolved

     [ https://issues.apache.org/jira/browse/SLING-9657?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Radu Cotescu updated SLING-9657:
--------------------------------
    Fix Version/s: Scripting HTL Testing 1.0.22-1.4.0
                   Scripting HTL Testing Content 1.0.20-1.4.0

> Same-name JS Use dependencies are not always correctly resolved
> ---------------------------------------------------------------
>
>                 Key: SLING-9657
>                 URL: https://issues.apache.org/jira/browse/SLING-9657
>             Project: Sling
>          Issue Type: Bug
>          Components: Scripting
>    Affects Versions: Scripting HTL JS Use Provider 1.2.4
>            Reporter: Radu Cotescu
>            Assignee: Radu Cotescu
>            Priority: Major
>             Fix For: Scripting HTL Testing 1.0.22-1.4.0, Scripting HTL JS Use Provider 1.2.6, Scripting HTL Testing Content 1.0.20-1.4.0
>
>
> When solving JS dependencies using the resource-type hierarchy, the resolution is not always correct.
> Example content structure:
> {noformat}
> /apps/page/
>     page.html
>     head.js
> /apps/project/page
>     [sling:resourceSuperType=page]
>     page.html
>     partials/
>         head.html
>         head.js
> {noformat}
> Example calling model:
> {{/apps/project/page/page.html}}
> {code:html}
> <div data-sly-include="partials/head.html}"></div>
> {code}
> {{/apps/project/page/partials/head.html}}
> {code:html}
> <div data-sly-use.head="head.js"></div>
> {code}
> With the above setup, the {{head.js}} script being select is the one from {{/apps/page/head.js}}, instead of the file inside {{partials}}. While this takes the resource type hierarchy into consideration, the correct caller is {{partials/head.html}}, hence why the resolution should happen "locally".



--
This message was sent by Atlassian Jira
(v8.3.4#803005)