Alias Name Not Resolving to Correct Page | Community
Skip to main content
Surabhi_Katiyar
Adobe Employee
Adobe Employee
August 24, 2022
Solved

Alias Name Not Resolving to Correct Page

  • August 24, 2022
  • 1 reply
  • 1062 views

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.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by SameerDhawan

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-configurations-1

1 reply

SameerDhawanAdobe EmployeeAccepted solution
Adobe Employee
August 24, 2022

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-configurations-1