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

Ian Boston commented on SLING-1181:
-----------------------------------

When a ResourceProvider was added in the old system it would be consukted if 
the path started with the path where the resource provider was added. 
BundleResourceProviders are added with /apps meaning anything starting with 
/apps is given to that resource provider, as well as any others eg 
/apps/sling/default/servlet/GET

In the new system the assumption (incorrectly was made that we only consulted 
providers at the end of a path.

Hence is 1 provider P1 was added at /apps 
and another P2 added at /apps/sling
and we searched for a resource  at /apps/sling/testing only P2 would be 
consulted, but P1 handles /apps/sling/testing

We need to add all providers at 
/apps 
/apps/sling
/apps/sling/testing

eg P1 *and* P2 to get the completed list


Or at least I think thats whats happening since we are not getting the 
BundleResourceProvider consulted when listing children.

> Scripts loaded by Bundle Resource Provider are not found in script resolution
> -----------------------------------------------------------------------------
>
>                 Key: SLING-1181
>                 URL: https://issues.apache.org/jira/browse/SLING-1181
>             Project: Sling
>          Issue Type: Bug
>            Reporter: Vidar S. Ramdal
>            Assignee: Ian Boston
>            Priority: Critical
>         Attachments: SLING-1181-test-bundle-source-and-jar.zip
>
>
> When a script file is loaded as a bundle resource (using 
> Sling-Bundle-Resources directive), it is not picked up during script 
> resolution.
> The bundle resource IS listed at /system/console/bundleresources, and the 
> script source is available at its URL under /apps.
> I can reproduce this problem using the latest trunk build (rev #834413), but 
> not in builds prior to rev#825679. I will try to narrow it down, to find the 
> actual change causing this.
> To reproduce:
> 1. Run a fresh Sling build
> 2. Upload a bundle with a 
> <Sling-Bundle-Resources>/apps</Sling-Bundle-Resources> directive, containing 
> a file at /apps/someResourceType/bundleresource.esp. The script file could 
> contain the code:
>     "BundleResource script, <%=currentNode.path%>"
> 3. Using WebDAV, create a script at /apps/someResourceType/webdav.esp. The 
> script file could contain the code:
>    "WebDAV-uploaded script, <%=currentNode.path%>"
> 4. Create a node /test, with sling:resourceType=someResourceType
> 5. Browse to http://localhost:8080/apps/someResourceType/bundleresource.esp, 
> and assert that the source code of the script file is displayed
> 6. Browse to http://localhost:8080/system/console/bundleresources, and assert 
> that the /apps resource is listed
> 7. Browse to http://localhost:8080/test.webdav, and assert that the 
> WebDAV-uploaded script is used to render the node (displaying 
> "WebDAV-uploaded script, /test")
> 8. Browse to http://localhost:8080/test.bundleresource
> Expected result:
> - The bundleresource-provided script is used to render the node, displaying 
> "BundleResource script, /test"
> Actual result:
> - 403 Forbidden

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to