You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Sagar Miglani (Jira)" <ji...@apache.org> on 2021/06/17 10:43:02 UTC

[jira] [Comment Edited] (SLING-10476) Aliases in MapEntries are removed in delete event of jcr:content present in the parent directory

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

Sagar Miglani edited comment on SLING-10476 at 6/17/21, 10:42 AM:
------------------------------------------------------------------

Hi [~rombert],

Here is the PR: [https://github.com/apache/sling-org-apache-sling-resourceresolver/pull/47]

Please let me know in case I've missed something. Looking forward to your comments and suggestions :)

Thanks.
Sagar

PS: Apologies for the late PR, was stuck on something else


was (Author: sagarmiglani):
Hi [~rombert],

Here is the PR: [https://github.com/apache/sling-org-apache-sling-resourceresolver/pull/47]

Please let me know in case I've missed something. Looking forward to your comments and suggestions :)

Thanks.
Sagar

PS: Apologies for the late PR, was stuck with something else

> Aliases in MapEntries are removed in delete event of jcr:content present in the parent directory
> ------------------------------------------------------------------------------------------------
>
>                 Key: SLING-10476
>                 URL: https://issues.apache.org/jira/browse/SLING-10476
>             Project: Sling
>          Issue Type: Bug
>          Components: ResourceResolver
>    Affects Versions: Resource Resolver 1.7.0
>            Reporter: Sagar Miglani
>            Priority: Major
>             Fix For: Resource Resolver 1.7.10
>
>
> When a {{jcr:content}} node is deleted, it removes all the aliases present below that path
> For example:
> Let's say we have
> {code:xml}
>     /
>         - content
>     	    - A
>     	        - jcr:content
>     	        - B
>     	            - de_DE - has sling:alias de
>     		    - en_GB - has sling:alias en
>     	        - C
>     		    - it_CH - has sling:alias it
> {code}
> If /{{content/A/jcr:content}} node is removed, It deletes all the aliases (in-memory in the MapEntries) which start with {{/content/A/}}
> See: {{sling-resourceresolver:MapEntries.java}} ([https://github.com/apache/sling-org-apache-sling-resourceresolver/blob/org.apache.sling.resourceresolver-1.7.0/src/main/java/org/apache/sling/resourceresolver/impl/mapping/MapEntries.java#L330])



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