Anchors url not purge when page changed

AI-generated summary

Anchors URL Not Purged When Page Changed

Don reported a bug where clicking an anchor on a page (e.g., /tos) correctly adds it to the URL, but when navigating to another page, the URL remains unchanged. This can cause issues when clicking anchors on other pages or reloading the site, as it redirects to the previous page. vincefrommtl was able to replicate the issue on their forum.

sam acknowledged the bug and flagged it for internal triage. A fix has since been implemented by pmusaraj via a commit on GitHub.

Hello,

If I click an anchor on /tos page e.g.: feedback
It will correctly add it to the url.

But if I navigate to an other page the url won’t change.

It can cause issues if I navigate to an other page which also use anchors and when I click to these anchors it will redirect to the previous page. Or if I reload the site it also will redirect to the previous page.

On the video I click an anchor link and after that click an other anchor link on another page and it redirect to the previous page.

Thank you :slightly_smiling_face:

4 Likes

Can replicate on my forum :slight_smile:

2 Likes

What a strange bug, thanks heaps for raising it, we will have a look over the next few weeks I have it flagged for internal triage.

3 Likes

This should be fixed now via: FIX: URL fragments not purging (#19324) · discourse/discourse@57fe57e · GitHub

2 Likes

This topic was automatically closed after 3 days. New replies are no longer allowed.