You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Angela Schreiber (Jira)" <ji...@apache.org> on 2020/07/30 15:35:00 UTC
[jira] [Created] (SLING-9623) ResourceMapperImpl.getAllMappings is
incomplete for nested alias
Angela Schreiber created SLING-9623:
---------------------------------------
Summary: 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
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)