Jean-Christophe Kautzmann created SLING-12859:
-------------------------------------------------

             Summary: wrong alias when moving a resource
                 Key: SLING-12859
                 URL: https://issues.apache.org/jira/browse/SLING-12859
             Project: Sling
          Issue Type: Bug
          Components: ResourceResolver
            Reporter: Jean-Christophe Kautzmann


When moving a page and its descendants and iterating over the moved pages in a 
replication pre-processor [0], {{ResourceResolver#map}} does not apply the 
{{sling:alias}} for the first path, but returns the correct one for its 
descendant. It seems to be a timing issue:
1st path: the pre-processor call is triggered before the alias handling:
{code}
14.07.2025 13:22:33.846 *ERROR* 
[sling-threadpool-f4a33873-6011-45a1-8068-b2eae4bfc4ca-(apache-sling-job-thread-pool)-8-Async
 Page Move and Rollout Queue Config(com/adobe/cq/wcm/jobs/async/pagemove)] 
com.adobe.aem.wcm.franklin.internal.replication.AliasReplicationPreprocessor 
jck: Sling path '/content/jck3/test/foo/page2' for resource 
'/content/jck3/test/page1/page2'
14.07.2025 13:22:33.871 *DEBUG* [sling-oak-observation-1] 
org.apache.sling.resourceresolver.impl.mapping.MapEntries onChange, 
type=CHANGED, path=/content/jck3/test/page1/page2/jcr:content
14.07.2025 13:22:33.871 *DEBUG* [sling-oak-observation-1] 
org.apache.sling.resourceresolver.impl.mapping.MapEntries Found alias, total 
size 1
14.07.2025 13:22:33.871 *WARN* [sling-oak-observation-9] 
com.adobe.aem.sites.eventing.impl.repository.PersistenceQueryManagerImpl No 
page found at path /content/jck3/test/page1/page2/jcr:content
{code}

2nd path: the pre-processor call is triggered after the alias handling:
{code}
14.07.2025 13:22:34.375 *DEBUG* [sling-oak-observation-14] 
org.apache.sling.resourceresolver.impl.mapping.MapEntries onChange, 
type=CHANGED, path=/content/jck3/test/page1/page2/jcr:content
14.07.2025 13:22:34.375 *DEBUG* [sling-oak-observation-14] 
org.apache.sling.resourceresolver.impl.mapping.MapEntries Found alias, total 
size 1
14.07.2025 13:22:34.375 *WARN* [sling-oak-observation-4] 
com.adobe.aem.sites.eventing.impl.repository.PersistenceQueryManagerImpl No 
page found at path /content/jck3/test/page1/page2/jcr:content
14.07.2025 13:22:34.376 *ERROR* 
[sling-threadpool-f4a33873-6011-45a1-8068-b2eae4bfc4ca-(apache-sling-job-thread-pool)-8-Async
 Page Move and Rollout Queue Config(com/adobe/cq/wcm/jobs/async/pagemove)] 
com.adobe.aem.wcm.franklin.internal.replication.AliasReplicationPreprocessor 
jck: Sling path '/content/jck3/test/foo/bar/index' for resource 
'/content/jck3/test/page1/page2/index'
{code}

Internal reference: SITES-33484




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to