The "linkchecker" transformer and shortening of long links | Community
Skip to main content
LinearGradient
New Participant
October 16, 2015
Solved

The "linkchecker" transformer and shortening of long links

  • October 16, 2015
  • 1 reply
  • 1209 views

Hi,

Does the linkchecker transformer, apart from checking broken links, transform long links in generated HTML pages to their short forms?

For example, we have this configuration in our /etc/map.publish:

{ "jcr:created":"Mon Mar 31 2014 22:17:42 GMT+1100", "jcr:primaryType":"nt:folder", "jcr:createdBy":"admin", "http":{ "jcr:created":"Mon Mar 31 2014 22:17:42 GMT+1100", "jcr:primaryType":"nt:folder", "jcr:createdBy":"admin", "site-1":{ "sling:internalRedirect":[ "/content/myapp/e4/b0/70/b06c95be-f9e6-4c67-b7ac-4c961e7ac41b/home" ], "jcr:created":"Mon Mar 31 2014 22:17:42 GMT+1100", "jcr:createdBy":"admin", "jcr:primaryType":"sling:Mapping", "sling:match":"site-1.4503", "redirect":{ "sling:internalRedirect":[ "/content/myapp/e4/b0/70/b06c95be-f9e6-4c67-b7ac-4c961e7ac41b/home/$1", " /$1" ], "jcr:created":"Mon Mar 31 2014 22:17:42 GMT+1100", "jcr:createdBy":"admin", "jcr:primaryType":"sling:Mapping", "sling:match":"(.+)$" } }, "site-1-homepage.4503":{ "sling:internalRedirect":[ "/content/myapp/e4/b0/70/b06c95be-f9e6-4c67-b7ac-4c961e7ac41b/home.html" ], "jcr:created":"Mon Mar 31 2014 22:17:42 GMT+1100", "jcr:createdBy":"admin", "jcr:primaryType":"sling:Mapping", "sling:match":"site-1.4503/$" } } }

I was expecting if I had a link like this in an HTML page:

<a href="/content/myapp/e4/b0/70/b06c95be-f9e6-4c67-b7ac-4c961e7ac41b/home.html">Home</a>

It was transformed to 

<a href="http://site-1:4503/">Home</a>

In JCR Resolver I can see the mapping is correct:

[img]mapping.png[/img]

But in generated HTML pages, it is not getting shortened.

According to a few people I have spoken to, the linkchecker should shorten the links, but I don't understand why it does not work like that in my environment.

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 joerghoh

/etc/map.publish ?

Is that just a typo? Normally CQ (better: sling) expects this to be in /etc/map, unless you changed it in configuration.

Jörg

1 reply

joerghoh
joerghohAccepted solution
Employee
October 16, 2015

/etc/map.publish ?

Is that just a typo? Normally CQ (better: sling) expects this to be in /etc/map, unless you changed it in configuration.

Jörg