mybb-amnesia
mybb-amnesia copied to clipboard
Redirection is not working after click to Accept
Maybe would be nice to redirect user to the main page (or configurable URL)
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 - 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.
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).
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).
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.
It’ll probably be the friendly redirects bit then, as I have that turned off on my forum.
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:
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.