Expand my Community achievements bar.

SOLVED

<a href=> tag is not getting on publish environment

Avatar

Level 2

I am facing issue with <a href=> html tag which is not getting on publish/dispatcher page and link is disappearing, please find below affected html.

<div class="c-error-page__error-content__error-description" data-sly-test="${data.errorDescription}">${data.errorDescription @context="html"}</div>

        <sly data-sly-list.item="${data.links}" data-sly-test="${data.links}">

            <a class="c-error-page__error-content__btn-white" href="${item.linkURL}" data-sly-test="${item.linkText}">${item.linkText}</a>

        </sly>

   </div>

i have authored link URL and text on page component and it's showing in jcr node of page but class applied for <a> tag and authored URL link it's not getting on publish environment, please find below affected page source html.

<div class="c-error-page__error-content__error-description"><p>Page not found.</p>

</div>

                    Go to Homepage       

</div>

This issue is working fine on my local and lower dev (author/publish) environment but facing issue on production publish environment.

I am not sure why it's not working to specific publish environment, can you please give me some inputs.

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

Hi,

AEM link checker is used to validate all internal and external links available on the page.

It automatically checks links and will not publish a broken link. In some ways, this is great, since AEM self-monitors and corrects for issues, but when you know the link is correct and it wont let you write it, then theres a problem.

The following are few example links which might not be published by AEM (AEM consider them as broken links):

  1. href="tel:123-456-7890"
  2. href="*|FORWARD|*"
  3. href="http://www.facebook.com/sharer/sharer.php?u=*|URL:ARCHIVE_LINK_SHORT|*"
  4. href="http://twitter.com/intent/tweet?text=*|URL:MC_SUBJECT|*: *|URL:ARCHIVE_LINK_SHORT|*"

How to fix this issue:

In order to fix this issue, you can follow either of the steps mentioned in the below articles:

http://aemexperience.blogspot.com/2015/07/aem-link-checker-fixing-broken-links.html

http://www.aemcq5tutorials.com/tutorials/aem-link-checker-comprehensive-guide/#fix-broken-links-aem

Also you can refer to following links which will help you resolve this issue:

http://www.wemblog.com/2011/10/how-to-make-sure-that-links-are-always.html

https://helpx.adobe.com/experience-manager/kb/DisableLinkChecker.html

I hope this helps!

Regards,

Lavanya Malyala

View solution in original post

5 Replies

Avatar

Level 8

Day Link checker configuration validates if the URL is valid URL or not, if not then it will remove the anchor tag, please check Link check configuration in production publish instance. you can try disabling link checker service and check if you are able to see links are appearing in the output, after disabling link check service you should all valid and invalid links.

Disabling link checker service is not recommended, you can do this only for troubleshooting.

http://www.aemcq5tutorials.com/tutorials/aem-link-checker-comprehensive-guide/

Avatar

Correct answer by
Former Community Member

Hi,

AEM link checker is used to validate all internal and external links available on the page.

It automatically checks links and will not publish a broken link. In some ways, this is great, since AEM self-monitors and corrects for issues, but when you know the link is correct and it wont let you write it, then theres a problem.

The following are few example links which might not be published by AEM (AEM consider them as broken links):

  1. href="tel:123-456-7890"
  2. href="*|FORWARD|*"
  3. href="http://www.facebook.com/sharer/sharer.php?u=*|URL:ARCHIVE_LINK_SHORT|*"
  4. href="http://twitter.com/intent/tweet?text=*|URL:MC_SUBJECT|*: *|URL:ARCHIVE_LINK_SHORT|*"

How to fix this issue:

In order to fix this issue, you can follow either of the steps mentioned in the below articles:

http://aemexperience.blogspot.com/2015/07/aem-link-checker-fixing-broken-links.html

http://www.aemcq5tutorials.com/tutorials/aem-link-checker-comprehensive-guide/#fix-broken-links-aem

Also you can refer to following links which will help you resolve this issue:

http://www.wemblog.com/2011/10/how-to-make-sure-that-links-are-always.html

https://helpx.adobe.com/experience-manager/kb/DisableLinkChecker.html

I hope this helps!

Regards,

Lavanya Malyala

Avatar

Community Advisor

To trouble shoot

Check 1

  Is this returning you valid objects ? data.links ; is this returning the value intended ?

Check 2

   If check 1 is cleared , then make sure the links returned are valid. But since you are saying in the lower region it is working fine, I would like you to cross verify this as others suggested

Check 3

Always keep your immediate lower region (STAGE or PREVIEW) as a replica of PROD and do a exact content to content test in those regions before going for PROD deployment

Thanks

Veena

Avatar

Level 10

As most of them said, 1st thing is to check your href link. You can disable the linkchecker following the below steps and see if that works

  1. Go to /system/console/configMgr and login as admin
  2. Find the "Link Checker Transformer"
  3. Check the "Disable Checking" box and save
  4. Go to /crx/explorer and login as admin
  5. Open "Content Explorer"
  6. Browse to /var/linkchecker
  7. Right click the node and select "Delete Recursively"
  8. Click "Save All"

Also, I see there is a <div> missing in your html which you may to correct it.

Avatar

Level 3

I am also facing the same issue. But this issue we have just in production. I compared the link checker configuration and its is the same in the lower environments. I tried adding x-cq-linkchecker="skip" to the a tag. I cannot test the same in the lower environments as we don't have this issue in lower environments. This attribute is not getting displayed in the a tag using DOM explorer. Is that expected? Will we not see this parameter in the DOM Explorer? Can some one help?

The following has evaluated to null or missing: ==> liqladmin("SELECT id, value FROM metrics WHERE id = 'net_accepted_solutions' and user.id = '${acceptedAnswer.author.id}'").data.items [in template "analytics-container" at line 83, column 41] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign answerAuthorNetSolutions = li... [in template "analytics-container" at line 83, column 5] ----