Fixed Redirect to home page instead of page login is on

digitalpoint

Well-known member
Affected version
2.1.2
Finally figured out how to reproduce a bug that users have been reporting where they get prompted to login to a specific page. If they enter the right username/login the first time, it sends them where to the expected page. If they fail the login and try again, then it sends them to the home page after logging in.

If you add the "redirect" param to the $viewParms for the "login" template, it seems to work. Without digging into it, I'm guessing when you don't specify the redirect variable, it's using $_SERVER['HTTP_REFERER'], which is /login/login after the first failed login.
 
Thank you for reporting this issue. It has now been resolved and we are aiming to include it in a future XF release (2.1.3).

Change log:
Ensure the login form, particularly when it errors, maintains its redirect URL.
Any changes made as a result of this issue being resolved may not be rolled out here until later.
 
Back
Top Bottom