Anchor Links Not Working After Update to 8.0.4

Greetings

I have a simple page which uses anchor links. (https://sonic.co.za/faq) This page was working fine until the last update (or two) and now the anchor links do not work at all. I don’t use custom CSS on this page and since it was working just fine I cannot imagine what has caused it to stop working.

I have also cleared all the caches from W3 after the update but nothing seems to make a difference.

Howdy, @DanteCampbell! Thanks for writing in…when you say that your anchor links aren’t working, I’m assuming you mean the hash links on the page you provided above? So all the red links under the sections like “Internet,” “Accounts,” “Equipment,” et cetera, correct? If that is the case, I have gone ahead and setup a test on my local install using hash links, and things are working as expected for me. I did notice some things on your page though:

  1. I see that for each of your links, the href is set to something like #Q1.1, but I do not see a corresponding value of Q1.1 set as an id on the appropriate Element you want to link to. Were these ids present before the update? They will need to be set for these hash links to work.
  2. I would recommend as a general best practice for these hash links to use a format more akin to Q1-1, where you replace any special characters with a dash. I believe that certain characters such as a period are technically allowed, but they have to be escaped when referenced in certain ways (e.g. \.), so to avoid any potential confusion or issues, I would recommend keeping it cleaner with the dash.

If you could let us know about #1 above, please do as things seem to be working here on my end, and the absence of your id values would make sense as to why these aren’t working. Of course, if they were present before the update but got removed somehow, we would want to know about that to look into any potential issues. Thanks!

Greetings @kory

I have used a hidden classic custom headline above each headline with the ‘id’ element set to each of the # tags.
image

So each of these is set to the question and then the above links point to those positions. It seemed to be working just fine until the update. I also updated today to 8.0.7 but its still an issue.

Hey @DanteCampbell ,

The one page navigation feature doesn’t work with the hidden elements. Simply assign your ID to the corresponding headline elements (not hidden) to resolve the issue.

Let us know how this goes!

Hi there,

I’ve got the same problem over here (https://thomasmorgensternhelicopter.com/en/). The anchor links in the navigation are not working anymore after updating to 8.0.8.
I checked the menu as well as the ids, everything seems to be fine but it is just no working.

happy for any advice as I am trying for several hours by now but I just can’t fix it…

Thank you,
Alexandra

Hi @DanteCampbell,

Are you using any kind of HTML minification or optimization? I find it strange that the headline elements do not have the id attribute anymore.

@AlexandraMandler, I’ve checked your site and the navigation is working. If you’re having any other issues feel free to open your own thread and we can help you out.

Greetings Alexander

I am not using any minification but I am using W3 Total Cache, which I clear after each update.

Ya I don’t understand it, because it was working fine right up until the 8 Update.

Greetings Nabeel

When I say hidden I mean that there is no text inside that element. But its just a normal headline element.

Thanks @DanteCampbell,

In that case would you mind if I logged in to check the site? You can add logins in a secure note. I don’t understand why the IDs are no longer being output but very curious to find out whats going on and hopefully get it solved for the next release.

Sure, that would be great.

Here are the details attached in the secure note.

Hi @DanteCampbell,

Thanks for sharing the credentials, but the user does not have administrator privilege to investigate the Cornerstone content and other settings which may be the reason behind your issue.
I would request you to assign administrator privileges to the user let us know for further process.

Thanks

Ah my bad, iv updated the permissions.

Hey @DanteCampbell,

The issue is you inserted a dot in the ID. It’s now allowed.

image

Replace it with a -.
image

To prove that it works, I’ve tested it in the first link here https://sonic.co.za/faq/#Q1-1

image

Hope that helps.

Wonderful! Thanks so much, ill remember that one in the future.

Hi @DanteCampbell,

Glad that we are able to help you.

Thanks

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.