You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Nan Fan (JIRA)" <ji...@apache.org> on 2014/04/10 04:47:15 UTC

[jira] [Comment Edited] (SLING-3496) Synthetic resource cannot be resolved, but its children can be resolved

    [ https://issues.apache.org/jira/browse/SLING-3496?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13962621#comment-13962621 ] 

Nan Fan edited comment on SLING-3496 at 4/10/14 2:47 AM:
---------------------------------------------------------

I understand your points, it makes sense but a little bit complex to protect servlet and its fake parents in same protection rule, especially when two different servlet resources have common fake parent(s).

So, for now, if I need create a /content/newfolder1/myres1 in my sample, the most safe way is to create /content, newfolder1 and myres1 as sling:Folder nodes separately, right?


was (Author: fannan):
I understand your points, it makes sense but a little bit complex to protect servlet and its fake parents in same protection rule, especially when two different servlet resources have common fack parent(s).

So, for now, if I need create a /content/newfolder1/myres1 in my sample, the most safe way is to create /content, newfolder1 and myres1 as sling:Folder nodes separately, right?

> 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)