mybb-amnesia icon indicating copy to clipboard operation
mybb-amnesia copied to clipboard

Redirection is not working after click to Accept

Open Eldenroot opened this issue 6 years ago • 8 comments

Maybe would be nice to redirect user to the main page (or configurable URL)

Eldenroot avatar May 25 '18 15:05 Eldenroot

Take a look at the value for the url_before_redirect form field (basing on $_SERVER['HTTP_REFERER']) on the Accept page, respected if this condition is met: https://github.com/kawaii/mybb-amnesia/blob/15e2115/inc/plugins/amnesia/hooks_frontend.php#L307

dvz avatar May 26 '18 15:05 dvz

@dvz - ok, there is an issue if the user does not have any "previous pages" visited, so the redirect returns back to GDPR page over and over. Maybe would be nice in that cases to redirect this user to forum homepage.

Eldenroot avatar May 27 '18 11:05 Eldenroot

It should redirect to Board URL, unless it's not not set properly; another reason for a loop is an update date set in the future (in this case the Accept button would keep appearing).

dvz avatar May 27 '18 19:05 dvz

Yeah I think it's not working properly. I have a date set in the past and if the user logs in and has to accept it just accepts but redirects to the policy page again (no accept button).

IntoxNitram avatar May 28 '18 14:05 IntoxNitram

I personally cannot duplicate this...it seems to work as expected for me on a test board with no other plugins installed.

that being said, I did notice that when you turn off friendly redirects and you accept the new policy, it does not remove the message until you click on another part of the site to get it to load a new page. this could probably be fixed, I assume, by forcing the page to go to the board url after a user clicks 'accept' if they have friendly redirects turned off.

andrewjs18 avatar May 28 '18 20:05 andrewjs18

It’ll probably be the friendly redirects bit then, as I have that turned off on my forum.

IntoxNitram avatar May 28 '18 20:05 IntoxNitram

weird..the message did go away after clicking 'accept' this time with friendly redirects turned off. earlier it wasn't.

this is what it'd look like earlier after accepting the policy with the redirects turned off:

2018-05-28 16_55_36

andrewjs18 avatar May 28 '18 20:05 andrewjs18

Yep it seems inconsistent I’ve just tried it again on another account on my live forum and it redirected correctly back to the index this time.

IntoxNitram avatar May 28 '18 21:05 IntoxNitram