Issue with links and Dispatcher with multiple domains | Community
Skip to main content
Level 4
October 16, 2015
Solved

Issue with links and Dispatcher with multiple domains

  • October 16, 2015
  • 6 replies
  • 3699 views

Hi masters!

I’m configuring a Dispatcher with multiple domains, and I’ve an issue with links. Maybe somebody could help me…

I’ve followed the instructions given in [1]. Please note the method I’ve used is ‘AEM Rewrites Incoming URLs’, not the ‘The Web Server Rewrites Incoming URLs’.

It seems all is working fine. I can access my web pages using the domain name, like:

http://myserver.mydomain/es.html

I’ve also configured the Sling mapping for resource resolution (in /etc/maps, in publish instance), so I can access /etc/designs, /libs, etc.

But my problem is with the links: 

  • In my author instance, I add a Text Component with a link to other page, like /content/myapp/es/other.html.
  • In the publish instance, I can see the link pointing to http://myserver.mydomain/es/other.html (ok, that's fine!).
  • But, when I access through the Dispatcher, I can’t see the link. It’s removed.

Any advice? Thank you very much!

[1] https://dev.day.com/docs/en/cq/current/deploying/dispatcher/disp_domains.html#AEM Rewrites Incoming URLs

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 Ojjis

There's a problem with the LinkcheckerTransformer. If you disable of the "Link Checking" unfortunately it also disables the "Link Rewriting". Ask the support for a hotfix and that should resolve that specific problem.

/Johan

6 replies

Level 4
October 16, 2015

I've marked the checkbox 'Disable Checking' (linkcheckertransformer.disableChecking) in 'Day CQ Link Checker Transformer' (com.day.cq.rewriter.linkchecker.impl.LinkCheckerTransformerFactory), in OSGi Console. For debug purposes.

Now, I can see the link when I access though the Dispatcher. But the link is incorrect. It points to 'http://myserver.mydomain/content/myapp/es/commons.html'. It should point to 'http://myserver.mydomain/es/commons.html'.

So, why the link is not rewritten? I'm missing something... ¿?...

Any help will be appreciated!

Scott_Brodersen
Level 8
October 16, 2015

The link is wrong because you turned off the link transformer.

 

Regarding your previous post, I'm not sure why the link did not show up on the page via Dispatcher, but appears fine without Dispatcher. Is the page cache being invalidated correctly? Try forcing a fresh render by including a "?" at the end of the URL.

scott

Level 4
October 16, 2015

Hi scott!

I've checked that the page is refreshing correctly. I've included a "?" at the end of the URL. Furthermore, I've made changes to the page, activated, and check that those changes are made in the page, accessing though the dispatcher. Also, I've deleted the content of dispatcher DocumentRoot folder :-)

But the links are still removed if I access through dispatcher. Maybe the Link Transformer is working different, if I access the page though the dispatcher or through the publish instance... ¿?

Thank you!

Level 2
October 16, 2015

Though it should not happen but you can check the difference between these 2 requests (one thru dispatcher and another direct to publish) using "Recent Requests" tab under system console.

Level 4
October 16, 2015

Hi om_vineet! Thank you for your reply.

I've checked the 2 requests using "Recent Requests", in system console of publish instance. Both of them are almost identical, the only difference is the resource resolution (as expected):

  • through dispatcher: 
    (2014-02-11 13:31:13) TIMER_END{0,ResourceResolution} URI=/es.html resolves to Resource=JcrNodeResource, type=cq:Page, superType=null, path=/content/myapp/es
  • through publish instance: 
    (2014-02-11 13:31:28) TIMER_END{0,ResourceResolution} URI=/content/myapp/es.html resolves to Resource=JcrNodeResource, type=cq:Page, superType=null, path=/content/myapp/es

This is correct. And there're no more differences.

I don't see any reference to link checker or link transformer... So, it doesn't help much...

Ojjis
OjjisAccepted solution
Level 7
October 16, 2015

There's a problem with the LinkcheckerTransformer. If you disable of the "Link Checking" unfortunately it also disables the "Link Rewriting". Ask the support for a hotfix and that should resolve that specific problem.

/Johan