Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

Alias Name Not Resolving to Correct Page

Avatar

Level 2

a) We are having a Page with the name Sigma
b) Created a new page B with the alias name as sigma(same as page A).
c) We are activating the new Page (Page B) which is having an alias name Sigma.
d) Then we have deactivated page A.
e) When we access page B through the dispatcher using the alias 'sigma' we get a 404 error.
f) We cleared the dispatcher cache and tried resulting in the same issue.
g) We tried accessing the page in the publisher directly and faced the same issue. Also couldn't find any errors in the logs.
Secondly, Whenever we are activating the Alias Page then at the time Original page is also getting activated.

1 Accepted Solution

Avatar

Correct answer by
Level 2

Hello Surabhi,

 

As per my understanding and based on the discussion with Adobe Product Team we should avoid such kinds of configurations.
According to documentation [0], Alias is just a different name for a resource under a path.

If you have following resources:
/content/x/y/z/test

and you create another resource with an alias name (alias name same as the resource in the previous step) under same path:
/content/x/y/z/test_new - sling:alias="test"

 

You would end up in creating two resources with same path ("/content/x/y/z/test") which may lead to unexpected results.

Also, The second issue that you have highlighted that Whenever we are activating the Alias Page then at that time Original page is also getting activated.

I believe this use-case is incorrect as you are keeping two resources under same path - which should not be allowed on Author instance as I have explained above.

 

[0] https://sling.apache.org/documentation/the-sling-engine/mappings-for-resource-resolution.html#alias-...

View solution in original post

1 Reply

Avatar

Correct answer by
Level 2

Hello Surabhi,

 

As per my understanding and based on the discussion with Adobe Product Team we should avoid such kinds of configurations.
According to documentation [0], Alias is just a different name for a resource under a path.

If you have following resources:
/content/x/y/z/test

and you create another resource with an alias name (alias name same as the resource in the previous step) under same path:
/content/x/y/z/test_new - sling:alias="test"

 

You would end up in creating two resources with same path ("/content/x/y/z/test") which may lead to unexpected results.

Also, The second issue that you have highlighted that Whenever we are activating the Alias Page then at that time Original page is also getting activated.

I believe this use-case is incorrect as you are keeping two resources under same path - which should not be allowed on Author instance as I have explained above.

 

[0] https://sling.apache.org/documentation/the-sling-engine/mappings-for-resource-resolution.html#alias-...