Steps to get this bug:
- You click on a link which redirects to a section where you don’t have access to.
- If it says error 404, click on the
<button to go to the previous page - It just redirects to the 404 page instead of the previous page.
A bug report discusses an issue where users cannot return to a previous internal page after encountering a 404 error, as the back button redirects to the 404 page instead. Chaboi_3000 initially describes the steps to reproduce the issue, noting it occurs when attempting to access restricted content. codinghorror attempts to reproduce it but fails, suggesting a potential browser-specific behavior. featheredtoast identifies a possible cause related to the click interceptor interfering with Ember routes and references a related fix. After a patch is applied, Chaboi_3000 confirms the issue is resolved. Brandon_Martus and zogstrip seek further clarification and oversight on the matter.
Steps to get this bug:
< button to go to the previous pageNo repro.
google.comIt happens to me when I do this:

In discourse, I click on the link above, but I don’t have permissions to go to the that site setting.
Then I can’t go back to the discourse post with the link.
I’m fairly sure that this has to do with our click interceptor failing to avoid stepping on ember route’s toes - I fixed a similar issue we noticed while navigating to the hidden profile pages, and it sounds like that it’s the same issue you’re experiencing here ![]()
https://github.com/discourse/discourse/commit/09cbd08c64d0f405ecfbafee7203ac4946ddac15
FYI this wasn’t it and these changes have been reverted - I’ll be looking for a better solution to this soon.
Was this change merged in? I’ve got a relatively recent version running and am running into the same problem where you can’t use the back button on the browser from a hidden profile page. I was able to reproduce it here on meta, also.
@maja can you have a look?
Can repro this by going to the regular badge page.
https://meta.discourse.org/badges/3/regular
then viewing this fella’s profile there
then trying to go back to the previous internal page.
Robin made a patch here that may resolve this. I’m no longer able to reproduce the issue reported here on meta since the patch, @Chaboi_3000 can you confirm this?
Yep, it’s fixed now. Thanks.