General Discussion [Resolved] "Return To Previous Page" does not appear after logging in on a news post that has zero

View : : :
4 Replies. 1 pages. Viewing page 1.
Newer [  1  ] Older
4.
 
Re:
Mar 13, 2021, 10:41
4.
Re: Mar 13, 2021, 10:41
Mar 13, 2021, 10:41
 
Frans wrote on Mar 10, 2021, 02:48:
RedEye9 wrote on Mar 8, 2021, 14:25:
"Return To Previous Page" does not appear after logging in on a news post that has zero comments.
That's because the browser already went through one redirect inside the scripts, so the Referer path of the original request is no longer available. Changing that would require something like passing that path in a &url= parameter throughout the login process, which looks fugly and is cumbersome in the code.
After posting this, I had a tiny spark of an idea I could look into only now, and I've made a small improvement:

From a thread page with 1+ comments (board.pl?action=viewthread), clicking the Post/Reply/Quote buttons when not logged in redirects to the log-in form, where that thread link is stored as Referer in a hidden field. That's why after logging in, it can be presented in the Return button below the user menu.

When a story has no comments, after clicking "Post a Comment" from the front-page and logging in, the Referer is the front-page. Thus the code doesn't enable the Return button: that's a little pointless as the site logo already provides that link back.

But from a Share / single-story link (/s/#####/...) clicking "Post a Comment" does contain a meaningful Referer, so I've now updated the log-in code to show a Return button in that case too.

As mentioned before, a Referer from the post form (board.pl?action=postmessage) is not available because that redirect happens internally in the script without a new browser request. That's why a direct return to the post form cannot be done hassle-free.
-- Frans
Avatar 13939
3.
 
No subject
Mar 11, 2021, 21:28
3.
No subject Mar 11, 2021, 21:28
Mar 11, 2021, 21:28
 
Thanks, didn't want to create a code issue cause I like my code curvy and delicious.

The major issue, with staying logged in is that it's one of the easiest ways to avoid tracking (not so much here on BUNNs) but other sites.
Is by having cookies and history deleted as often as possible, such as closing the browser.
Not to mention everyone should be grateful I don't post every time I drop by, I'm not sure how many more feet I can get in my mouth!
‘What is this bullshit that you people are doing?’
The worst criminal in human history, undeniably.
Beating and Gassing Americans for Jesus!
Ain't no tweetin, in jail jammies!
Avatar 1858
2.
 
Re:
Mar 10, 2021, 02:48
2.
Re: Mar 10, 2021, 02:48
Mar 10, 2021, 02:48
 
RedEye9 wrote on Mar 8, 2021, 14:25:
"Return To Previous Page" does not appear after logging in on a news post that has zero comments.
That's because the browser already went through one redirect inside the scripts, so the Referer path of the original request is no longer available. Changing that would require something like passing that path in a &url= parameter throughout the login process, which looks fugly and is cumbersome in the code.

Simple user solutions: don't log out (the auto-login cookie keeps you logged in for a year).
Or open the User Settings/Login link from the masthead in a second tab to log in, then click on Post a Comment in the first tab. And stay logged in.

This comment was edited on Mar 10, 2021, 16:14.
-- Frans
Avatar 1258
1.
 
[Resolved] "Return To Previous Page" does not appear after logging in on a news post that has zero
Mar 8, 2021, 14:25
1.
[Resolved] "Return To Previous Page" does not appear after logging in on a news post that has zero Mar 8, 2021, 14:25
Mar 8, 2021, 14:25
 
"Return To Previous Page" does not appear after logging in on a news post that has zero comments.
Still hoping one day, to be able to login and return to the intended page to post.-
If there is no current post in an article you want to post in. You login, then get stuck, have to return to the Bluesnews.com, and then back to the article page.
Reported here

This comment was edited on Mar 23, 2021, 21:12.
- I refer to it as BC, Before Corona, and AD, After Disaster. -
Avatar 58135
4 Replies. 1 pages. Viewing page 1.
Newer [  1  ] Older