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

Angela Schreiber commented on SLING-9623:
-----------------------------------------

[~rombert], regarding 'optimise=true' behaving slightly different: I noticed 
that when investigating an alias-related problem with AEM (that surfaced this 
issue in addition). IMHO, it would be really helpful if the Sling documentation 
would be very specific about this... currently the documentation only explains 
why the optimization exists and why it is recommended to keep it enabled.

> ResourceMapperImpl.getAllMappings is incomplete for nested alias
> ----------------------------------------------------------------
>
>                 Key: SLING-9623
>                 URL: https://issues.apache.org/jira/browse/SLING-9623
>             Project: Sling
>          Issue Type: Bug
>          Components: ResourceResolver
>    Affects Versions: Resource Resolver 1.6.16
>            Reporter: Angela Schreiber
>            Assignee: Robert Munteanu
>            Priority: Major
>             Fix For: Resource Resolver 1.6.18
>
>         Attachments: SLING-9623-test.patch
>
>
> while investigating an issue involving {{sling:alias}}, i inadvertently 
> created nested alias i.e. ended up having an alias define for the parent and 
> a child page.
> when looking at the values obtained from {{ResourceMapper.getAllMappings}}, i 
> noticed that it only contains 1 combination. cross-checking however revealed 
> that all combinations define valid paths that are properly resolved by sling.
> h5. Example
> parent: _/parent_ with alias name 'alias-parent'
> child: _/parent/child_ with alias name 'alias-child'
> valid paths for the child are (and expected from 
> {{ResourceMapper.getAllMappings}}):
> - _/parent/child_
> - _/parent/alias-child_
> - _/alias-parent/alias-child_
> - _/alias-parent/child_
> actual values obtained from {{ResourceMapper.getAllMappings}}:
> - _/parent/child_
> - _/alias-parent/alias-child_
> consequently, an consumer of {{ResourceMapper.getAllMappings}} will miss 
> valid alias path mappings. with additional nesting or addition of multiple 
> alias values (see SLING-9620), the number of missed paths will increase.



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

Reply via email to