Symptoms

When accessing my author via dispatcher (http://myauthor.mycompany.com), the Link Checker Service adds internal links to the external links list.

Cause

Some responses created by CQ WCM include the referer information (any code that uses the HtmlResponse, such as SlingPostServlet). This referrer is then a fully qualified URL including "http" or "https", which is then treated as external link.

Resolution

Add an exception to the link checker to tell it to ignore all URL patterns for hostnames that are used to access the author instance through the dispatcher. To do this, do the following:

  1. Log into http://[host]:[port]/crxde as admin
  2. If you do not already have a custom link checker configuration in your application then copy the node /libs/cq/linkchecker/config.author/com.day.cq.rewriter.linkchecker.impl.LinkCheckerImpl to /apps/[yourapp]/config.author/com.day.cq.rewriter.linkchecker.impl.LinkCheckerImpl
  3. Select the config node com.day.cq.rewriter.linkchecker.impl.LinkCheckerImpl
  4. On the bottom of the right pane, expand the Properties tab
  5. Double click service.check_override_patterns
  6. Add another override pattern for the URL that is being marked invalid
    For Example: if the broken links are all URLs with the hostname cq5author.mycompany.com, then your override pattern would be: ^http://www.mycompany.com/.*
  7. Delete any nodes under /var/linkchecker corresponding to the invalid link's host
    For Example: following the example in the last step, we would delete /var/linkchecker/http/cq5author.mycompany.com
  8. Click Save All

Note: [host] and [port] above refer to the hostname and port of your CQ5 author server. [yourapp] refers to the name of your CQ5 application under /apps.

WARNING: If you apply this configuration and your users accidentally create links that point to http://cq5author.mycompany.com/... instead of using the path then these links will be broken in your publish instance. To avoid this problem, please notify your authors that they must use paths for all internal links.

Applies to

CQ 5.X

Dette arbejde har licens under en Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Opslag på Twitter™ og Facebook er ikke omfattet af vilkårene for Creative Commons.

Juridiske meddelelser   |   Politik for beskyttelse af personlige oplysninger online