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

Nan Fan updated SLING-3496:
---------------------------

    Description: 
The change in SLING-3482 causes a problem that synthetic resource cannot be 
resolved, but its children can be resolved in below scenarios:

Scenario 1:

Please refer attached bundle and source, I package a resource which parent 
folder does not exist previously in jcr repository. The resource is declared in 
pom as:

<Include-Resource>{maven-resources},src/main/scripts</Include-Resource>
<Sling-Bundle-Resources>/apps/newfolder1/myres1</Sling-Bundle-Resources>

After install bundle, it does return 404 for url '/apps/newfolder1.json' and 
returns json for '/apps/newfolder1/myres1.json'.

Scenario 2:
The resource.path in esp script returns '<name>.<selector>.<extension>' for 
Synthetic resources. The code is in 
bundles/extensions/explorer/src/main/resources/libs/sling/servlet/default/explorer/node.esp)

var path = resource.path;

it will return '/libs.explorer.node.html' if I'm visiting url 
'/libs.explorer.node.html' where '/libs' is a synthetic resource.

  was:
The change in SLING-3482 causes a problem that synthetic resource cannot be not 
resolved, but its children can be resolved in below scenarios:

Scenario 1:

Please refer attached bundle and source, I package a resource which parent 
folder does not exist previously in jcr repository. The resource is declared in 
pom as:

<Include-Resource>{maven-resources},src/main/scripts</Include-Resource>
<Sling-Bundle-Resources>/apps/newfolder1/myres1</Sling-Bundle-Resources>

After install bundle, it does return 404 for url '/apps/newfolder1.json' and 
returns json for '/apps/newfolder1/myres1.json'.

Scenario 2:
The resource.path in esp script returns '<name>.<selector>.<extension>' for 
Synthetic resources. The code is in 
bundles/extensions/explorer/src/main/resources/libs/sling/servlet/default/explorer/node.esp)

var path = resource.path;

it will return '/libs.explorer.node.html' if I'm visiting url 
'/libs.explorer.node.html' where '/libs' is a synthetic resource.

        Summary: Synthetic resource cannot be resolved, but its children can be 
resolved  (was: Synthetic resource cannot be not resolved, but its children can 
be resolved)

> Synthetic resource cannot be resolved, but its children can be resolved
> -----------------------------------------------------------------------
>
>                 Key: SLING-3496
>                 URL: https://issues.apache.org/jira/browse/SLING-3496
>             Project: Sling
>          Issue Type: Bug
>          Components: ResourceResolver
>    Affects Versions: Resource Resolver 1.1.0
>         Environment: OS X 10.8.5, JDK 1.6.0_65
>            Reporter: Nan Fan
>         Attachments: mysample-1.0.0-SNAPSHOT.jar, mysample-source.zip
>
>
> The change in SLING-3482 causes a problem that synthetic resource cannot be 
> resolved, but its children can be resolved in below scenarios:
> Scenario 1:
> Please refer attached bundle and source, I package a resource which parent 
> folder does not exist previously in jcr repository. The resource is declared 
> in pom as:
> <Include-Resource>{maven-resources},src/main/scripts</Include-Resource>
> <Sling-Bundle-Resources>/apps/newfolder1/myres1</Sling-Bundle-Resources>
> After install bundle, it does return 404 for url '/apps/newfolder1.json' and 
> returns json for '/apps/newfolder1/myres1.json'.
> Scenario 2:
> The resource.path in esp script returns '<name>.<selector>.<extension>' for 
> Synthetic resources. The code is in 
> bundles/extensions/explorer/src/main/resources/libs/sling/servlet/default/explorer/node.esp)
> var path = resource.path;
> it will return '/libs.explorer.node.html' if I'm visiting url 
> '/libs.explorer.node.html' where '/libs' is a synthetic resource.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to