Expand my Community achievements bar.

SOLVED

URL shortening not happening - OOTB link transformer throwing error after rewrite and removing valid internal page anchor in publish instance.

Avatar

Level 2

Hi Everyone,

I have been working in AEM as a cloud service version. After applying the URL shortening in Resource Resolver Factory config, the internal page reference in the anchor href are getting removed in publish instances and rendering them as blank broken links. 

"resource.resolver.mapping":[
"/:/",
"/content/mysite/:/"
]

 

NOTE :

The LinkCheckerTransformerFactory config:

"linkcheckertransformer.disableRewriting":false,
"linkcheckertransformer.disableChecking":true,

LinkCheckerImplConfig:

"service.check_override_patterns":["^system/"]

 

The page is absolutely fine in author and is a valid internal page that is authored in anchors and activated. I have debugged the Link Checker Services by enabling the logs in publishers , below is what i could . Is this some peculiar issue that is specific to AEMCaas. 

 

com.day.cq.rewriter.linkchecker.impl.LinkCheckerTransformer LinkCheckerTransformerConfig mapped content/mysite/en/page to /en/page
com.day.cq.rewriter.linkchecker.impl.LinkCheckerTransformer href attribute rewritten from /content/mysite/en/page to /en/page
com.day.cq.rewriter.linkchecker.impl.LinkCheckerTransformer Exception occurred while validating rewritten Href null

 

https://somedomain/en/page . The url when accessed with shortened path in publisher is loading fine, also resolved when checked with jcrresource resolver mapper but it is getting removed when applied in anchor href's and not shortened . Any lead on this would be really helpful.

 

 

 

 

1 Accepted Solution

Avatar

Correct answer by
Level 2

Thanks everyone whom ever had a look at the issue. Actually there is custom sling rewrite pipeline in our project code base which is preceding over default pipeline and leading to this issue with Transformer service.

 

https://sling.apache.org/documentation/bundles/output-rewriting-pipelines-org-apache-sling-rewriter....

 

Marking this ticket as closed as we need to work on a fix in our project code base.

View solution in original post

1 Reply

Avatar

Correct answer by
Level 2

Thanks everyone whom ever had a look at the issue. Actually there is custom sling rewrite pipeline in our project code base which is preceding over default pipeline and leading to this issue with Transformer service.

 

https://sling.apache.org/documentation/bundles/output-rewriting-pipelines-org-apache-sling-rewriter....

 

Marking this ticket as closed as we need to work on a fix in our project code base.