ElkArte Community

Title: Back button not working when accessing hidden areas
Post by: Flavio93Zena on July 03, 2015, 01:03:46 pm
The "back" button when it says "Sorry, we can't let you access this section. We can't even tell you if it exists. You're welcome to visit the main page and choose your way from there." doesn't actually bring me back, it refreshes the page and nothing else.

Do note, in case it wasn't obvious... I mean the "back" button that is plugged into elkarte, not the browser one.
Title: Re: Back button not working when accessing hidden areas
Post by: Burke Knight on July 03, 2015, 01:09:04 pm
Okay, how did you try to access the page in question?
If opened new tab, and typed it in, there would be no place for the back button to send you.

Unless the last page, was a page on the forum, then that will happen.
Title: Re: Back button not working when accessing hidden areas
Post by: Flavio93Zena on July 03, 2015, 01:10:20 pm
action=admin / action=moderate and probably any other hidden section you don't have access to, take your pick ;)
Title: Re: Back button not working when accessing hidden areas
Post by: Burke Knight on July 03, 2015, 01:12:42 pm
I did not ask what pages you tried to access.
Read what I said:

Quote from: Burke Knight – Okay, how did you try to access the page in question?
If opened new tab, and typed it in, there would be no place for the back button to send you.

Unless the last page, was a page on the forum, then that will happen.
Title: Re: Back button not working when accessing hidden areas
Post by: Flavio93Zena on July 03, 2015, 01:14:23 pm
Dude, there's an URL bar that can be edited!!! LOL!
Title: Re: Back button not working when accessing hidden areas
Post by: Burke Knight on July 03, 2015, 01:24:02 pm
@Flavio93Zena
That was precisely why I had asked what I did!
Because, if typed it into the URL box in new tab, what I said would be a factor. A known issue with most javascript back buttons... LOL

However, I have this to say for the bug report, after finally getting my answer in our off site chatting:
Confirmed for me.
Seems the javascript code needs some fine tuning.

I am unfamiliar with the code used for it, but this code here, usually works fine:

Code: [Select]
<FORM>
<INPUT TYPE="Button" VALUE="Previous Page" onClick="history.go(-1)">
</FORM>
Title: Re: Back button not working when accessing hidden areas
Post by: Flavio93Zena on July 03, 2015, 01:30:30 pm
No new tab, didn't even consider that but I had tested of course without a new tab ;) Thanks for pointing it out.
Title: Re: Back button not working when accessing hidden areas
Post by: Burke Knight on July 03, 2015, 01:33:18 pm
No new tab???? That's so... So... barbaric!!!! LOL
Title: Re: Back button not working when accessing hidden areas
Post by: emanuele on July 03, 2015, 02:18:29 pm
The code is there like that because of other reasons.
TBH, in the scenario described I wouldn't bother fixing it (at the price of make it fail pretty badly in almost the entire admin panel because of hooks).