Sign In Module and PageToRedirectToAfterSignIn

This is the place to report bugs and get support. When posting in this forum, please always provide as much detail as possible.

Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum, do not report it as a bug.

This is the place to report bugs and get support

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.
Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum.
This thread is closed to new posts. You must sign in to post in the forums.
9/24/2012 6:18:36 PM
Gravatar
Total Posts 19

Sign In Module and PageToRedirectToAfterSignIn

Version 2.3.9.0 MS SQL

I'm not sure if this is a bug or by design.  If I put a sign in module on a page, I do not get redirected to the page set in PageToRedirectToAfterSignIn.

If I login through the sign in link at the top of the page (layout.master) I do get redirected.

I'm expecting the user to always be redirected to the page set in PageToRedirectToAfterSignIn.

9/25/2012 9:55:05 AM
Gravatar
Total Posts 18439

Re: Sign In Module and PageToRedirectToAfterSignIn

Well, the login module has the login control inside an UpdatePanel that does an ajax postback and redirects will not work in the context of an ajax postback, so it while I can sort of fix this it will not be a perfect fix.

I will add this code:

if ((WebConfigSettings.PageToRedirectToAfterSignIn.Length > 0)&&(WebConfigSettings.UseRedirectInSignInModule))
{
login1.SetRedirectUrl = true;
UpdatePanel1.ChildrenAsTriggers = false;
}

which basically says if you have a hard coded url confiugred for redirect it will make it not use an ajax postback but instead do a full postback so redirect is possible. In testing it works ok as far as redirecting except that since it is not doing an ajax page update you won't see an error message if the credentials entered are incorrect. Also its possible that some feature content could disappear from the page during the full postback because some features only populate on non postback requests. 

So really there is no ideal fix for this and if you are using a hard coded redirect page it is probably best to not use the sign in module and only use the real login page.

I generally recommend against forcing a specific page redirect after sign in, in most scenarios it is not the best idea. For example if a user must sign in to post in the forums or sign in to complete a web store purchase the normal behavior will redirect him back to where he was in the forums or the store and this hard coded redirect bypasses that and can result in bad user experience and lost sales.

So if you have a special case where it really does make sense to have a hard coded redirect then I'm afraid the sign in module is not going to work ideally in that case.

Best,

Joe

You must sign in to post in the forums. This thread is closed to new posts.