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™

[Pro User] Issue/Bug with Free Registration using Pro Forms

s2Member Plugin. A Membership plugin for WordPress®.

[Pro User] Issue/Bug with Free Registration using Pro Forms

Postby skipshean » September 20th, 2011, 4:07 pm

Using Pro, v. 110915 on WP v.3.2.1.

I have a free registration form for our site (get a free eBook offer landing page) at this URL: http://explosiveoptions.net/5-essential-rules-to-winning-at-options-ebook/

Issue:
User completes the form (>500 in the last 48 hours), it successfully creates the user, but some subset of these users the form does not seem to properly parse the Firstname and Lastname entries into the field in Wordpress (see screenshot) -- but the "Displayname" field has the first and last name, obviously entered by the user.

As a result, MailChimp is not sending the opt-in confirmation emails, the user can't click to confirm, and they aren't getting the whitepaper they were looking for.

This issue currently affects 298 of the 500 some odd registrations in the last 48 hours -- a serious issue!

I need to:

1.) correct the problem going forward so future registrations don't have this happen, and
2.) correct the past registrations AND re-process the Mailchimp listserver.

Please help -- urgent!
Attachments
Screen Shot 2011-09-20 at 4.55.27 PM.png
Blank firstname/lastname -- but note displayname is filled
User avatar
skipshean
Registered User
Registered User
 
Posts: 44
Joined: June 15, 2011
Location: Chicago

Re: [Pro User] Issue/Bug with Free Registration using Pro Fo

Postby Jason Caldwell » September 20th, 2011, 5:41 pm

Thanks for reporting this important issue.
~ Investigating now.
~ 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

Re: [Pro User] Issue/Bug with Free Registration using Pro Fo

Postby skipshean » September 20th, 2011, 5:48 pm

Thank you, will watch for your reply. Another 20 people signed up since I reported this...ugh, success problems... :-)
User avatar
skipshean
Registered User
Registered User
 
Posts: 44
Joined: June 15, 2011
Location: Chicago

Re: [Pro User] Issue/Bug with Free Registration using Pro Fo

Postby Jason Caldwell » September 20th, 2011, 7:05 pm

Thanks for your patience.
Hmm, I've been unable to reproduce this so far. Are you running any object caching plugins? Or anything that might be pulling stale information during registration in some way? For instance, W3 Total Cache has an object caching routine which is known to have some issues in this regard.
~ 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

Re: [Pro User] Issue/Bug with Free Registration using Pro Fo

Postby skipshean » September 20th, 2011, 7:41 pm

I am running W3totalcache. I turned off the object cache since you mentioned that specifically -- does the whole thing need to be off? It seriously sped up our site, I'd hate to turn it all off...

Is there anything that I can do about the prior signups? I can export them to CSV, parse the displayname into firstname/lastname fields.

But I'm not sure how to re-import them so that the list servers reprocess...and what to do about the now 300+ that are in there? Is there a way to delete them in a batch that you can think of?

Ugh. Really appreciate your help on this one.
User avatar
skipshean
Registered User
Registered User
 
Posts: 44
Joined: June 15, 2011
Location: Chicago

Re: [Pro User] Issue/Bug with Free Registration using Pro Fo

Postby Jason Caldwell » September 20th, 2011, 7:59 pm

Thanks for the follow-up.

No, just disable object caching, I think that should do it.
Either that, or go with Quick Cache ( which I developed, and has been heavily tested against s2Member ).
http://wordpress.org/extend/plugins/quick-cache/

I would pull an export in CSV format, fix the First/Last Name fields, then re-import them. s2Member Pro's importation feature allows you to do mass updates, not just imports. Just be sure to read over the importation instructions completely, before you begin. When importing mass updates to existing Users, please be sure that your CSV import file includes the ID column for each User.

Or, if you'd like to try this, it's easier ( please BACKUP your database first though ).

Create this directory and file:
/wp-content/mu-plugins/s2-fix-user-names.php
Code: Select all
<?php
add_action 
("init", "s2_fix_user_names");
function s2_fix_user_names ()
    {
        if (!empty ($_GET[__FUNCTION__]))
            {
                foreach (get_users () as $user)
                    {
                        if (($user = new WP_User ($user->ID)) && !$user->first_name && !$user->last_name && $user->display_name)
                            {
                                list ($first_name, $last_name) = preg_split ("/ +/", $user->display_name, 2);
                                wp_update_user (array ("ID" => $user->ID, "first_name" => $first_name, "last_name" => $last_name));
                            }
                    }
                exit ("All fixed!");
            }
    }
?>

Now visit this URL on your site:
Code: Select all
http://yoursite.com/?s2_fix_user_names=yes
Now delete the /s2-fix-user-names.php file. All done.

You should be able to use your CSV export file to import those names/emails into your MailChimp account as well. That way they'll get a confirmation letter, which they missed before.
~ 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

Re: [Pro User] Issue/Bug with Free Registration using Pro Fo

Postby skipshean » September 20th, 2011, 8:20 pm

I'm not 100% on the re-import process but I'll take it step by step and let you know if I have problems.

Thanks again for the fantastic speed of response - very impressive!
User avatar
skipshean
Registered User
Registered User
 
Posts: 44
Joined: June 15, 2011
Location: Chicago

Re: [Pro User] Issue/Bug with Free Registration using Pro Fo

Postby skipshean » September 21st, 2011, 7:22 am

Jason, FYI, I ran through the code steps above, and got no errors or problems -- but it didn't resolve the issue, from anything I can tell, either.

So I'm going the Excel route, and then I assume what you suggest on the Mailchimp side is to then import that CSV list directly into mailchimp, correct?
User avatar
skipshean
Registered User
Registered User
 
Posts: 44
Joined: June 15, 2011
Location: Chicago

Re: [Pro User] Issue/Bug with Free Registration using Pro Fo

Postby skipshean » September 21st, 2011, 9:58 pm

OK, Jason...I definitely did not get a change or a result from the code you wrote above. I'm convinced that I'm running it improperly. First question: mu-plugins = "multi-user"? I'm not using multi-user, so do I put that just in the wp-content/plugins folder?

I didn't get the "All fixed!" that the code suggested I would. :-(

I'm going the import route now, hopefully that will resolve better...
User avatar
skipshean
Registered User
Registered User
 
Posts: 44
Joined: June 15, 2011
Location: Chicago

Re: [Pro User] Issue/Bug with Free Registration using Pro Fo

Postby skipshean » September 21st, 2011, 10:19 pm

OK, I downloaded the serialized version of the user export as the import/export screens suggested. A few questions before I do the import:

1.) It looks like nearly every single user is on two lines (i.e., duped). Is this a normal behavior? The users screen is showing nearly (but not exactly) twice as many users as there actually are in the users table in the DB

2.) Is there a custom field or something I can do in the import to designate specific users that I want the mailchimp list servers to be re-processed?
User avatar
skipshean
Registered User
Registered User
 
Posts: 44
Joined: June 15, 2011
Location: Chicago

Re: [Pro User] Issue/Bug with Free Registration using Pro Fo

Postby skipshean » September 23rd, 2011, 3:45 pm

any response? particularly to number 2 above...
User avatar
skipshean
Registered User
Registered User
 
Posts: 44
Joined: June 15, 2011
Location: Chicago

Re: [Pro User] Issue/Bug with Free Registration using Pro Fo

Postby Cristián Lávaque » September 24th, 2011, 11:48 pm

1) No, that's not normal. There should be just one row per user. Do you have this same problem in the users list? WP Admin -> Users -> All

2) No, there isn't. This thread may help you: viewtopic.php?f=4&t=10388

By the way, mu in mu-plugins stands for "must use".

I hope that helps. :)
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: [Pro User] Issue/Bug with Free Registration using Pro Fo

Postby Jason Caldwell » September 27th, 2011, 6:39 pm

Regarding duplicate database entries and W3 Total Cache. Hmm. This is the second time in the last two weeks someone reported this. See: viewtopic.php?f=4&t=14661&p=34114&hilit=w3+total+cache+duplicate#p34114

Investigating further.
~ 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

Re: [Pro User] Issue/Bug with Free Registration using Pro Fo

Postby skipshean » September 27th, 2011, 8:35 pm

Jason,

thanks for sharing that -- by the way, i still can't figure out how to import my spreadsheet in to correct the bad records, can we cover that?

That code that you pasted above I went through all the steps of and (to my knowledge) it didn't do anything. No completion message, no error, nothing.

Look forward to your reply.
User avatar
skipshean
Registered User
Registered User
 
Posts: 44
Joined: June 15, 2011
Location: Chicago

Re: [Pro User] Issue/Bug with Free Registration using Pro Fo

Postby Jason Caldwell » September 27th, 2011, 9:09 pm

Here is an improved version of the previous script that I posted.
This one works the same way, but it now provides a line-by-line output of each operation it performs, so you should be able to see better what's happening.

Create this directory and file:
/wp-content/mu-plugins/s2-fix-user-names.php
Then load this page in your browser: http://yoursite.com/?s2_fix_user_names=yes
( be sure there are NO leading/trailing spaces/tabs/line breaks before or after the <?php ?> tags )
Code: Select all
<?php
add_action 
("init", "s2_fix_user_names");
function s2_fix_user_names ()
    {
        if (!empty ($_GET[__FUNCTION__]))
            {
                foreach (get_users () as $user)
                    {
                        if (($user = new WP_User ($user->ID)))
                            {
                                if (!$user->first_name && !$user->last_name && $user->display_name)
                                    {
                                        list ($first_name, $last_name) = preg_split ("/ +/", $user->display_name, 2);
                                        wp_update_user(array ("ID" => $user->ID, "first_name" => $first_name, "last_name" => $last_name));
                                        echo 'Updated User ID: ' . $user->ID . ' First Name: ' . $first_name . ', Last Name: ' . (($last_name) ? $last_name : '[empty]') . '<br />';
                                    }
                                else if ($user->first_name || $user->last_name)
                                    echo 'Skipping User ID: ' . $user->ID . '. User already has a First and/or Last name recorded.<br />';
                                /**/
                                else if (!$user->display_name)
                                    echo 'Skipping User ID: ' . $user->ID . '. User has no Display name on record, unable to parse.<br />';
                            }
                    }
                exit("All fixed!");
            }
    }
?>
~ 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

Re: [Pro User] Issue/Bug with Free Registration using Pro Fo

Postby skipshean » September 27th, 2011, 9:17 pm

awesome, that did the trick. thanks, jason!
User avatar
skipshean
Registered User
Registered User
 
Posts: 44
Joined: June 15, 2011
Location: Chicago


Return to s2Member Plugin

Who is online

Users browsing this forum: Google [Bot] and 3 guests

cron