Page 1 of 1

forgot password link not working

PostPosted: August 13th, 2011, 2:47 am
by jvmedia
We've imported users into our new site that's using s2member and there seems to be a curious error that's really got us stumped. If a new member was entered into the site since the import the forgot password function works just fine, however, if it's a user that was imported into the system the forgot password does not work. It seems to work in that there's no error message on the site, but an email never shows up. We've tried it on at least a dozen imported members now, all with different emails and no spam filters set up on their emails and the system just doesn't send the reset password email. The site has over 30,000 members so this is something we really need to get to the bottom of because it's highly likely when we send the notice to everyone that the new site is live, some people will try to use that function. Any ideas would be appreciated. Thanks

Re: forgot password link not working

PostPosted: August 14th, 2011, 1:37 pm
by Jason Caldwell
Thanks for reporting this important issue.
I've been unable to reproduce this so far in the latest release of s2Member.

Is it possible that your importation file had the email addresses in the wrong field? If you find a User in your Dashboard, is the email address a valid one? If so, please let me know and I'll dig deeper on this. If you can please let me know which versions of WordPress/s2Member/s2Member Pro that you're using, and if there is anything else that might help us reproduce this, please include that too.

Re: forgot password link not working

PostPosted: August 14th, 2011, 9:38 pm
by jvmedia
We're running the latest version of wordpress. I believe s2 is version 6.9 (says version 110710 in the admin) and it's the regular version. Also all the emails are definitely in the proper field as they all show up in the email field in the admin. The one's we've tested are all valid emails. Has us totally stumped.

Re: forgot password link not working

PostPosted: August 15th, 2011, 8:49 pm
by Jason Caldwell
Yea, that's very interesting. If you can provide me with a Dashboard login and FTP access, I'll be happy to have a quick look for you. If you'd like to do that, please submit those details privately with this contact form: http://www.s2member.com/contact/

Re: forgot password link not working

PostPosted: August 15th, 2011, 10:07 pm
by jvmedia
Thanks, just submitted the form.

Re: forgot password link not working

PostPosted: August 17th, 2011, 7:48 pm
by Jason Caldwell
Thank you. I just took a quick look.

Couple of things first.
1. Please upgrade to the latest version of s2Member, just so we're on the same page.
2. Please attempt to reproduce the issue you're reporting with a clean installation of WordPress/s2Member, or try eliminating other plugins. With 43 active plugins, it makes it very difficult to narrow this down. If you can narrow this down to s2Member, we'll be happy to have a look for you. In the mean time, you mentioned this was only happening with members that were imported. That would make me think that you might have another plugin installed, which depends on a User Meta field not supported by s2Member, and is somehow affecting the functionality of your Lost Password system for WordPress. *Note, the Lost Password recovery system is part of the WordPress core, and s2Member does not modify the behavior of that system. So I'm left to assume ( at least at this point ), it must related to a conflict between plugins that you're running.

Re: forgot password link not working

PostPosted: August 17th, 2011, 11:36 pm
by jvmedia
Thanks for taking a quick look at this. We're doing more trial & error on our end as well to try and narrow it down so if we go through all that and s2member seems to be it, I'll post again!

Re: forgot password link not working

PostPosted: September 24th, 2011, 11:49 am
by bitofgrace
How was this resolved? I'm having the same problem.
I'm testing before a HUGE import and when i try to login with a test imported user - it prompts me to reset password (good) but then i never receive the email with that password. : /

What sorts of plugins did it turn out to be interrupting this?

Re: forgot password link not working

PostPosted: September 25th, 2011, 5:25 pm
by Cristián Lávaque
Have you tried disabling the other plugins to see if the password reset email started going out again?

Re: forgot password link not working

PostPosted: September 25th, 2011, 5:35 pm
by bitofgrace
yes - i deactivated everything except Buddypress and S2 to test. (but wondered if was going to take removing them to figure it out) : /

There was no change while all was deactivated.

Re: forgot password link not working

PostPosted: September 27th, 2011, 7:59 pm
by Jason Caldwell
I just tested this in s2Member v110927 and BuddyPress v1.5 and everything seems to work OK. Please let us know if continue to have trouble in this regard.

Re: forgot password link not working

PostPosted: September 27th, 2011, 8:24 pm
by bitofgrace
I'm not on BP 1.5 yet..
But still having the problem. (lil stressed out because i can't go back to bare slate because of other integrated chat systems) Not at all sure where to look - because the emails just never arrive anywhere.

-grace

Re: forgot password link not working

PostPosted: September 27th, 2011, 9:17 pm
by Jason Caldwell
You can try this if you like.
Create this directory and file:
/wp-content/mu-plugins/wp-mail-debugger.php
( make sure there are no leading/trailing spaces or line breaks before or after <?php ?> )
( mu-plugins = MUST USE plugins, for debugging purposes in this case )
Code: Select all
<?php
add_filter 
("wp_mail", "wp_mail_debugger");
function wp_mail_debugger ($wp_mail = array ())
    {
        file_put_contents (WP_CONTENT_DIR . "/wp-mail-debugger.log", var_export ($wp_mail, true) . "\n\n", FILE_APPEND);
        return 
$wp_mail;
    }
?>
Now run your tests again. Log entries in this file would indicate that wp_mail IS being fired, and it will show some basic information about what was passed in to the function. If the log file here is NOT created, it means that wp_mail is not being fired at all for some reason. After running tests, see: /wp-content/wp-mail-debugger.log

Re: forgot password link not working

PostPosted: September 27th, 2011, 9:39 pm
by bitofgrace
ok- call me crazy - or call it magic debugger? :)
i created test users in the csv - imported them with debugger in place ... and it logged properly , tested fine... emails received successfully.

Is it a security problem if i leave the debugger in place?

(or will that log get huge and unruly if left without a cronjob clearing? )

Ooooh and i just received my first Admin notification that a PW was reset by a member :) YAY

Re: forgot password link not working

PostPosted: September 27th, 2011, 9:52 pm
by Jason Caldwell
Thanks for the follow-up.

Ha. That's extremely interesting. Code is a funny thing sometimes.
Try it like this so the log file does not actually get written to and see if it still works for you.
In either case though, this is a hackety hack at best. If this debugger causes things to work, it would indicate to me that you have another plugin conflict somewhere. A search through your plugin files for wp_mail might be a good idea.
Code: Select all
<?php
add_filter 
("wp_mail", "wp_mail_debugger");
function wp_mail_debugger ($wp_mail = array ())
    {
        return $wp_mail;
    }
?>

This is a great plugin too, and I've seen this solve problems for MANY site owners.
http://wordpress.org/extend/plugins/wp-mail-smtp/

Re: forgot password link not working

PostPosted: September 27th, 2011, 10:02 pm
by bitofgrace
Great : )
Our groups are allowed to mail their members (via a plugin)- which is very likely suspect. Even when deactivated those calls would be kinda live i suppose. (and i can't disengage them at this stage)

Thank you very much!

ooO that plugin does look promising - especially if its no-conflict to s2