Unable to go back to a previous page from account page

Hi, the following is happening for me.

  1. Click on link to /my/preferences
  2. Click on browser’s back button

Nothing happens

Would love this to be fixed!

I can reproduce this on Meta! Thanks for reporting :slight_smile:

https://meta.discourse.org/my/preferences

6 Likes

Hmm is this a new regression @sam or something we need to backport?

2 Likes

Pretty sure there have been issues here for many years, last time I recall @eviltrout investigating this, can you have a look Robin?

4 Likes

This seems to happen because https://meta.discourse.org/my/preferences actually goes to https://meta.discourse.org/u/user/preferences/ and then to https://meta.discourse.org/u/user/preferences/account.

You can see in the go back history the initial page and the https://meta.discourse.org/u/user/preferences/ page.

If you go directly to https://meta.discourse.org/u/user/preferences/account the error doesn’t happen.

To fix it I think the url https://meta.discourse.org/u/user/preferences/ shouldn’t go to history when you access (only https://meta.discourse.org/u/user/preferences/account).

This doesn’t happen when paste the url the browser.

In my case:

The problem happens: https://meta.discourse.org/u/lucasbasquerotto/preferences/

The problem doesn’t happen: https://meta.discourse.org/u/lucasbasquerotto/preferences/account/

4 Likes

This is another manifestation of a bug that has long plagued us. I believe this fix should last for a while, as it worked in all the cases I tried:

https://github.com/discourse/discourse/commit/02f6db4e59e03f49739be7e228641613dab0ae26

(the commit message has more detail.)

I suspect this has been here since our last Ember upgrade at least. Probably longer.

10 Likes