Highlighted

Link transformer config for Adobe campaign newsletter issue

deepankard86318

01-11-2017

The href <a href="tel:1800813327" target="_blank"> is rewritten

to 

<a href=\"https://www.mysite.comnull\" target=\"_blank\">

Adobe Campaign makes the following call to AEM to fetch content -

https://authordomain/content/campaigns/edm.campaign.content.json

The '.campaign.content.json ' selector servlet forms the html content from com.adobe.cq.mcm.campaign.impl.ContentgeneratorImpl class which uses link transformer config at /libs/mcm/config/rewriter/campaign-link-rewrite to rewrite links( surprisingly, it uses domain name in the exernalizer configuration; and not from sling mapping; should it not be using domain name from sling mappings?) and appends domain name in front of the link

Hence, the href 'tel' is not working ; similarly; mailto will also not work

We have removed 'A' from includeTags in the rewrite config as a quick fix; but it excludes all anchor tag from the config. What is the appropriate method of making the tel attribute work? Can certain attributes excluded from the rewriter config ? Or can the rewriter transformer config be overridden ?

Can someone please help on this?

Replies

Highlighted

kautuk_sahni

Community Manager

01-11-2017

Try:

To add 'tel:' as a "Special Link Prefix" in the configuration of the CQ Link Checker Service.

To do this, copy /libs/cq/linkchecker/config/com.day.cq.rewriter.linkchecker.impl.LinkCheckerImpl to a config folder under apps (e.g. /apps/myapp/config). Then edit the property service.special_link_prefix to add tel: as a new prefix.

Or Have a look at similar thread:-

~kautuk

Highlighted

deepankard86318

01-11-2017

H feike_visser​,

I added x-cq-linkchecker=”valid” and x-cq-linkchecker=”skip” but it did not have any impact, the link it still being rewritten as

<a href=\"https://www.mysite.comnull\" target=\"_blank\">

Can it be because the link checker service is com.day.cq.rewriter.linkchecker.impl.LinkCheckerImpl while the rewrite transformer for the .campaign.content  selector is at com.adobe.cq.mcm.campaign.impl.LinkTransformer ?

I can't disable the entire link checker service as it will disable it for entire instance.

Also; have added 'tel:' as a "Special Link Prefix" in the configuration of the CQ Link Checker Service; but not sure if it is in play here.

Is there a configuration in link transformer config which can make it exclude specific hrefs? Like includeTags of html-parser which specfies which tags to include ?

Highlighted