# Going back to previous internal page after 404

**URL:** https://meta.discourse.org/t/going-back-to-previous-internal-page-after-404/104067
**Category:** Bug
**Created:** [December 12, 2018, 1:28am UTC](https://meta.discourse.org/t/going-back-to-previous-internal-page-after-404/104067 "2018-12-12T01:28:23Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![Chaboi\_3000](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chaboi_3000/32/163015_2.png) [@Chaboi\_3000](https://meta.discourse.org/u/Chaboi_3000)
#### Post date: [December 12, 2018, 1:28am UTC](https://meta.discourse.org/t/going-back-to-previous-internal-page-after-404/104067/1 "2018-12-12T01:28:23Z")

</div>

Steps to get this bug:

1. You click on a link which redirects to a section where you don’t have access to.
2. If it says error 404, click on the `<` button to go to the previous page
3. It just redirects to the 404 page instead of the previous page.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [December 12, 2018, 1:39am UTC](https://meta.discourse.org/t/going-back-to-previous-internal-page-after-404/104067/2 "2018-12-12T01:39:14Z")

</div>

No repro.

1. Open new Chrome incognito window
2. Navigate to `google.com`
3. I try to visit the URL of a staff topic on [try.discourse.org](http://try.discourse.org) and get a 404
4. Press back button, I am taken back to Google

---

<div class="post-metadata">

### Author: ![Chaboi\_3000](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chaboi_3000/32/163015_2.png) [@Chaboi\_3000](https://meta.discourse.org/u/Chaboi_3000)
#### Post date: [December 12, 2018, 1:43am UTC](https://meta.discourse.org/t/going-back-to-previous-internal-page-after-404/104067/3 "2018-12-12T01:43:07Z")

</div>

It happens to me when I do this:  
 ![55%20AM](https://global.discourse-cdn.com/meta/original/3X/a/8/a8c5480d003b028faa7e6ecfd9a81506d95b2b55.png)  
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.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [December 12, 2018, 2:29am UTC](https://meta.discourse.org/t/going-back-to-previous-internal-page-after-404/104067/4 "2018-12-12T02:29:33Z")

</div>

Use the browser menu on the back link. Click and **hold** , or tap and **hold** , on the back arrow:

 ![image](https://global.discourse-cdn.com/meta/original/3X/3/a/3a1ca3c15cdeabd19c1489cd0f3e98d11e69ae41.png)

---

<div class="post-metadata">

### Author: ![featheredtoast](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/featheredtoast/32/116994_2.png) [@featheredtoast](https://meta.discourse.org/u/featheredtoast)
#### Post date: [January 8, 2019, 11:21pm UTC](https://meta.discourse.org/t/going-back-to-previous-internal-page-after-404/104067/8 "2019-01-08T23:21:25Z")

</div>

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](https://github.com/discourse/discourse/commit/09cbd08c64d0f405ecfbafee7203ac4946ddac15)

---

<div class="post-metadata">

### Author: ![featheredtoast](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/featheredtoast/32/116994_2.png) [@featheredtoast](https://meta.discourse.org/u/featheredtoast)
#### Post date: [January 10, 2019, 6:44am UTC](https://meta.discourse.org/t/going-back-to-previous-internal-page-after-404/104067/9 "2019-01-10T06:44:50Z")

</div>

FYI this wasn’t it and these changes have been reverted - I’ll be looking for a better solution to this soon.

---

<div class="post-metadata">

### Author: ![Brandon\_Martus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/brandon_martus/32/127631_2.png) [@Brandon\_Martus](https://meta.discourse.org/u/Brandon_Martus)
#### Post date: [February 26, 2019, 3:13pm UTC](https://meta.discourse.org/t/going-back-to-previous-internal-page-after-404/104067/10 "2019-02-26T15:13:31Z")

</div>

> [@featheredtoast](#):
>
> I fixed a similar issue we noticed while navigating to the hidden profile pages

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.

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [February 27, 2019, 9:05pm UTC](https://meta.discourse.org/t/going-back-to-previous-internal-page-after-404/104067/11 "2019-02-27T21:05:37Z")

</div>

@maja can you have a look?

---

<div class="post-metadata">

### Author: ![Chaboi\_3000](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chaboi_3000/32/163015_2.png) [@Chaboi\_3000](https://meta.discourse.org/u/Chaboi_3000)
#### Post date: [March 3, 2019, 5:13am UTC](https://meta.discourse.org/t/going-back-to-previous-internal-page-after-404/104067/13 "2019-03-03T05:13:58Z")

</div>

Can repro this by going to the regular badge page.  
[https://meta.discourse.org/badges/3/regular](https://meta.discourse.org/badges/3/regular)  
then viewing this fella’s profile there

> **[@discoursefreesignups](https://meta.discourse.org/u/discoursefreesignups/profile-hidden)**

then trying to go back to the previous internal page.

---

<div class="post-metadata">

### Author: ![featheredtoast](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/featheredtoast/32/116994_2.png) [@featheredtoast](https://meta.discourse.org/u/featheredtoast)
#### Post date: [June 21, 2019, 8:29pm UTC](https://meta.discourse.org/t/going-back-to-previous-internal-page-after-404/104067/14 "2019-06-21T20:29:03Z")

</div>

[Robin made a patch](https://meta.discourse.org/t/unable-to-go-back-to-a-previous-page-from-account-page/120948/8) 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?

---

<div class="post-metadata">

### Author: ![Chaboi\_3000](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chaboi_3000/32/163015_2.png) [@Chaboi\_3000](https://meta.discourse.org/u/Chaboi_3000)
#### Post date: [June 21, 2019, 10:55pm UTC](https://meta.discourse.org/t/going-back-to-previous-internal-page-after-404/104067/15 "2019-06-21T22:55:36Z")

</div>

Yep, it’s fixed now. Thanks.

---

<div class="post-metadata">

### Author: ![featheredtoast](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/featheredtoast/32/116994_2.png) [@featheredtoast](https://meta.discourse.org/u/featheredtoast)
#### Post date: [June 21, 2019, 11:07pm UTC](https://meta.discourse.org/t/going-back-to-previous-internal-page-after-404/104067/16 "2019-06-21T23:07:34Z")

</div>


