Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Externalizer page path impacted due to alias

Avatar

Level 2

Hi Team,

 

I was trying to form an external url based on custom domain;  Please see the below format.

 

// custom configured domain
 externalizer.externalLink(resolver, "mydomain", "https", "/content/site/en/page1", ) + ".html";
// => "https://mydomain.com/site/en/page1.html" (I was expecting this as an outcome)
// => "https://mydomain.com/site/en_gb/page1.html" (But I received this)

 After checking a few areas, I found that  "/content/site/en" has couple of alias and "en_gb" is one of them. So, does it mean every time on using external link, the top alias will be accounted if the resolved page hierarchy is encountering any set of alias. If I remove "en_gb" from alias set, then the same request was giving me "en_us" next time. 

 

DJSarkar_0-1655789250554.png

So, it'll be great to know if there'll be any way to avoid / exclude alias when trying to form external link.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi,

I think, this is happened because externalizer uses ResourceResolver.map(...) and resource resolver considering alias 

 

Can you try unchecking Optimize alias resolution from below osgi configuration in local and check

Apache Sling Resource Resolver Factory (org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl)

 

I would not suggest to updating this in PROD. The above change is just for testing.

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

Hi,

I think, this is happened because externalizer uses ResourceResolver.map(...) and resource resolver considering alias 

 

Can you try unchecking Optimize alias resolution from below osgi configuration in local and check

Apache Sling Resource Resolver Factory (org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl)

 

I would not suggest to updating this in PROD. The above change is just for testing.