[ https://issues.apache.org/jira/browse/SLING-1733?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12906608#action_12906608 ]
Eric Norman commented on SLING-1733: ------------------------------------ I spent some time debugging this and the problem was happening because the BundleResourceProvider.listChildren(parent) method was trying to get the list of children directly from the parent resource when the parent was a BundleResource. However, in this case, the parent resource was loaded from a different bundle than the bundle the provider was operating on. I added a check to make sure the parent resource is in the same bundle as what the provider is working with before using the parentResource.listChildren() shortcut. The attached patch fixes it for me. > BundleResourceProvider fails to find resources when multiple bundles have the > same Sling-Bundle-Resources path > -------------------------------------------------------------------------------------------------------------- > > Key: SLING-1733 > URL: https://issues.apache.org/jira/browse/SLING-1733 > Project: Sling > Issue Type: Bug > Components: Extensions > Affects Versions: Extensions Bundleresource 2.0.4 > Reporter: Eric Norman > Assignee: Eric Norman > Fix For: Extensions Bundleresource 2.0.6 > > Attachments: SLING-1733.patch > > > If multiple bundles are providing Sling-Bundle-Resources with the same path, > the resources from the second bundle are not accessible. > . > For example: > Bundle 1 contains these scripts: > /libs/sling/servlet/default/script1.html.esp > /libs/sling/servlet/default/script2.html.esp > And the resource is provided as: > <Sling-Bundle-Resources> > /libs/sling/servlet/default > </Sling-Bundle-Resources> > Bundle 2 contains these scripts: > /libs/sling/servlet/default/script2.html.esp > /libs/sling/servlet/default/script3.html.esp > And the resource is provided as: > <Sling-Bundle-Resources> > /libs/sling/servlet/default > </Sling-Bundle-Resources> > > With both bundles installed, you either see the scripts from bundle1 or the > scripts from bundle2 but not both. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.