PriMoThemes — now s2Member® (official notice)

This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™

login redirect not working

s2Member Plugin. A Membership plugin for WordPress®.

login redirect not working

Postby dwdutch » January 19th, 2011, 11:46 pm

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" /> &nbsp;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.
User avatar
dwdutch
Registered User
Registered User
 
Posts: 24
Joined: January 16, 2011

Re: login redirect not working

Postby dwdutch » January 21st, 2011, 12:10 pm

bump. anyone have an idea?
User avatar
dwdutch
Registered User
Registered User
 
Posts: 24
Joined: January 16, 2011

Re: login redirect not working

Postby Thomas » January 24th, 2011, 7:14 pm

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
User avatar
Thomas
Registered User
Registered User
 
Posts: 1
Joined: January 24, 2011

Re: login redirect not working

Postby nhsatomom » February 3rd, 2011, 1:24 pm

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!
User avatar
nhsatomom
Registered User
Registered User
 
Posts: 25
Joined: February 1, 2011

Re: login redirect not working

Postby camillemm » February 4th, 2011, 10:52 am

Same problem: it did work with WP 3.03 and it does not work anymore with WP3.04
User avatar
camillemm
Registered User
Registered User
 
Posts: 86
Joined: September 7, 2010

Re: login redirect not working

Postby Judith » February 4th, 2011, 11:16 am

I'm wondering if you couldn't put the following into your form:

http://www.yourdomainname.com/wp-login.php

after 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
User avatar
Judith
Registered User
Registered User
 
Posts: 26
Joined: February 1, 2011

Re: login redirect not working

Postby dwdutch » February 17th, 2011, 6:50 pm

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.
User avatar
dwdutch
Registered User
Registered User
 
Posts: 24
Joined: January 16, 2011

Re: login redirect not working

Postby camillemm » February 18th, 2011, 3:22 am

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.
User avatar
camillemm
Registered User
Registered User
 
Posts: 86
Joined: September 7, 2010

Re: login redirect not working

Postby Gayatriom » March 10th, 2011, 7:19 pm

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.
User avatar
Gayatriom
Registered User
Registered User
 
Posts: 21
Joined: January 28, 2011

Re: login redirect not working

Postby camillemm » March 11th, 2011, 2:19 am

I found it very easily as I created the login form myself using the code provided by WP and found on the web.
User avatar
camillemm
Registered User
Registered User
 
Posts: 86
Joined: September 7, 2010

Re: login redirect not working

Postby dwdutch » March 11th, 2011, 4:33 pm

@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.
User avatar
dwdutch
Registered User
Registered User
 
Posts: 24
Joined: January 16, 2011

Re: login redirect not working

Postby Gayatriom » March 12th, 2011, 9:36 am

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.
User avatar
Gayatriom
Registered User
Registered User
 
Posts: 21
Joined: January 28, 2011

Re: login redirect not working

Postby Jason Caldwell » March 23rd, 2011, 4:19 pm

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 )
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA


Return to s2Member Plugin

Who is online

Users browsing this forum: Bing [Bot], Yahoo [Bot] and 1 guest

cron