anchor links not working on published site | Community
Skip to main content
Nandheswara
Level 4
November 21, 2023

anchor links not working on published site

  • November 21, 2023
  • 3 replies
  • 3206 views

Hi all,

I'm using aem 6.5, when i author a anchor link set with opening in new tab in RTE component its working fine and navigating to the specifed section in the new tab in view as published mode but when i click the same anchor link in published page its only opening the page in new tab but not navigating to the specfic section. Can anyone give some solution for this issue please.

Thanks

Nandheswara

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

3 replies

aanchal-sikka
Community Advisor
Community Advisor
November 21, 2023

Hello @nandheswara 

 

The Anchor links are the HTML behavior. Please verify following:

 

1. The Anchor "#<id>" and id of the element are configured and available in HTML.

2. You are not getting any java script errors in browser console.

 

Aanchal Sikka
Nandheswara
Level 4
November 21, 2023

Anchor ID is configured and available in HTML

No errors were found in console

 

 

arunpatidar
Community Advisor
Community Advisor
November 23, 2023

Hi @nandheswara 
Where is the target element with the id? where you jump when click on this anchor link.

Arun Patidar
kautuk_sahni
Community Manager
Community Manager
November 23, 2023

@nandheswara 

There are potential reasons why anchor links might not be working correctly in AEM 6.5. Here are a few things to check:

  • Make sure the anchor ID is correct. The anchor ID is the part of the URL that comes after the #. It should be the same as the ID of the element you want to link to. For example, if you want to link to an element with the ID section2, the anchor ID would be #section2.
  • Make sure the element with the anchor ID is visible. If the element is hidden, the anchor link will not be able to find it.
  • Make sure there is no JavaScript interfering with the anchor links. Some JavaScript libraries can interfere with anchor links. If you are using any JavaScript libraries, try disabling them temporarily to see if that fixes the problem.
  • Make sure the clientlibs are included. The clientlibs are the JavaScript and CSS files that are needed for the anchor links to work. Make sure that the clientlibs are included in the page that you are using the anchor links on.
  • Clear your browser's cache. Sometimes, cached browser data can interfere with anchor links. Try clearing your browser's cache to see if that fixes the problem.

If you have checked all of these things and you are still having problems, you may need to contact Adobe support for further assistance.

Kautuk Sahni
kautuk_sahni
Community Manager
Community Manager
November 28, 2023

@nandheswara Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.

Kautuk Sahni