Expand my Community achievements bar.

SOLVED

Issue with links and Dispatcher with multiple domains

Avatar

Level 4

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

1 Accepted Solution

Avatar

Correct answer by
Level 7

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

View solution in original post

6 Replies

Avatar

Level 4

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!

Avatar

Level 8

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

Avatar

Level 4

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!

Avatar

Level 2

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.

Avatar

Level 4

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...

Avatar

Correct answer by
Level 7

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