Expand my Community achievements bar.

anchor links not working on published site

Avatar

Level 4

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

5 Replies

Avatar

Community Advisor

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

Avatar

Level 4

Anchor ID is configured and available in HTML

No errors were found in console

Nandheswara_0-1700557551611.png

 

 

Avatar

Community Advisor

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



Arun Patidar

Avatar

Administrator

@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

Avatar

Administrator

@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