Page 1 of 1
login redirect not working
Posted:
January 19th, 2011, 11:46 pm
by dwdutch
There seems to be a negative interaction between S2member and "Themes by bavotasan.com" Magazine Premium which provides for a tabbed drop-down that includes a login box. If user logs-in using this box then S2members's Login Redirection does not work. If user logs in directly from the wp-login.php then S2member's Login Redirection works perfectly.
The code in the theme seems innocent enough in that it simply passes control off to wp-login.php
- Code: Select all
<!-- Login Form -->
<form action="<?php echo site_url(); ?>/wp-login.php" method="post">
<div class="paneltitle">Member Login</div>
<label class="grey">Username:</label>
<input class="field" type="text" name="log" id="log" value="<?php if(isset($user_login)) echo esc_html(stripslashes($user_login), 1) ?>" size="23" />
<label class="grey">Password:</label>
<input class="field" type="password" name="pwd" id="pwd" size="23" />
<label><input name="rememberme" id="rememberme" type="checkbox" checked="checked" value="forever" /> Remember me</label>
<div class="clear"></div>
<input type="hidden" name="redirect_to" value="<?php echo curPageURL(); ?>"/>
<input type="submit" name="submit" value="Login" class="bt_login" /> <a class="lost-pwd" href="<?php echo site_url(); ?>/wp-login.php?action=lostpassword">Lost your password?</a>
</form>
Has anyone encountered this interaction before or had a similar circumstance for which Login Redirection fails to work?
Maybe I'm overlooking something... does anyone see a reason the above code segment would fail to trigger s2member's Login Redirection code?
I could really use some help/insight.
Re: login redirect not working
Posted:
January 21st, 2011, 12:10 pm
by dwdutch
bump. anyone have an idea?
Re: login redirect not working
Posted:
January 24th, 2011, 7:14 pm
by Thomas
Hi
I have the same issue.
I am a newbe so here goes, down loaded plugin s2members to my blog and installed it, followed the video for setting up the signup page and member login page, however when you try to go to the member login page what is expected is the subsituted s2members login page, but it refuses to do it and leaves you on the sign up page.
I checked the details on the plugin and noticed it had been tested on on wp 3.0.3, however my blog was running on the latest wp 3.0.4, maybe full testing on this has not been done yet, anyhow I cannot proceed now until I can get the 0 level s2members login page to appear.
Would welcome any ideas?
Thomas
Re: login redirect not working
Posted:
February 3rd, 2011, 1:24 pm
by nhsatomom
I'm having the same problem. I have confirmed the following:
- The login welcome page is properly designated in s2 general options
- Can't blame plugins -- I deactivated all but buddypress and s2 and problem didn't go away
- I'm running the latest versions of WP, BP and s2 pro
I might also mention that I upgrade to Pro this morning -- and it's after that the I noticed the problem. Maybe unrelated, but just covering all the ground worth mentioning here.
I sure hope someone can help me troubleshoot this!
Re: login redirect not working
Posted:
February 4th, 2011, 10:52 am
by camillemm
Same problem: it did work with WP 3.03 and it does not work anymore with WP3.04
Re: login redirect not working
Posted:
February 4th, 2011, 11:16 am
by Judith
I'm wondering if you couldn't put the following into your form:
http://www.yourdomainname.com/wp-login.phpafter echo.
The reason I ask is because my custom menu has that as a link and it takes them to my redesigned S2 Member login.
Seems to me if you put the exact url in it rather than what's in your form, S2 should take over.
Just a thought
Judith
Re: login redirect not working
Posted:
February 17th, 2011, 6:50 pm
by dwdutch
I solved my issue with the login redirect not working. there was no issue with S2member - it worked perfectly well. The source of the redirect conflict is actually in the theme's login code. My problem was not fully understanding the use of the 'redirect_to' hidden field as the theme passed control over to wp-login.php. All i had to do was comment-out that hidden field. no value was passed and S2member properly controled what was to happen next.
So, for my original issue (at least) this problem is resolved... perhaps this will offer some insight for others as well.
Re: login redirect not working
Posted:
February 18th, 2011, 3:22 am
by camillemm
Well, I get
- Code: Select all
<input type="hidden" name="redirect_to" value="<?php echo S2MEMBER_LOGIN_WELCOME_PAGE_URL; ?>" /
> and it does not work (it did work in WP 3.04). I found a solution installing another plugin: Peter's Login Redirect.
Re: login redirect not working
Posted:
March 10th, 2011, 7:19 pm
by Gayatriom
Hey.
So where did you find that hidden code which you commented out?
I am having the same problem.
Peter's login redirect is not working for me either.
Re: login redirect not working
Posted:
March 11th, 2011, 2:19 am
by camillemm
I found it very easily as I created the login form myself using the code provided by WP and found on the web.
Re: login redirect not working
Posted:
March 11th, 2011, 4:33 pm
by dwdutch
@Gayatriom - I'm not sure if you were directing your comment to me or @camillemm but since you asked about "commented out", I assume you meant me. I'm using the Magazine Premium theme from
http://themes.bavotasan.com/our-themes/premium-themes/magazine-premium/That theme has a drop-down control panel at the top of its pages in which there is a login block that is referenced in the header.php file. That's where I out my commented-out their REDIRECT line.
Re: login redirect not working
Posted:
March 12th, 2011, 9:36 am
by Gayatriom
Ah i see.
well It seems I figured out the problem.
If you are admin then you are not able to see the login welcome page in action.
Just change over to one of the s2member levels and you can see the login redirect in action.
Re: login redirect not working
Posted:
March 23rd, 2011, 4:19 pm
by Jason Caldwell
I just saw this comment.Gayatriom wrote:Ah i see.
well It seems I figured out the problem.
If you are admin then you are not able to see the login welcome page in action.
Just change over to one of the s2member levels and you can see the login redirect in action.
Yes, this is correct. s2Member will not apply login redirection to Administrators, Editors, Authors, or Contributors. Anyone who can edit Posts, should have access to the Dashboard, and so s2Member will NOT apply redirection to the Login Welcome Page in that scenario.
If you are testing your Login Welcome Page redirection, please setup some test accounts for would-be Members. For instance, when we test client sites, we create the following accounts:
Username: subscriber ( Free Subscriber )
Username: level1 ( s2Member Level 1 Role )
Username: level2 ( s2Member Level 2 Role )
Username: level3 ( s2Member Level 3 Role )
Username: level4 ( s2Member Level 4 Role )