Community Support Forums — WordPress® ( Users Helping Users ) — 2011-09-27T21:17:00-05:00 http://www.primothemes.com/forums/feed.php?f=4&t=15231 2011-09-27T21:17:00-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15231&p=41739#p41739 <![CDATA[Re: [Pro User] Issue/Bug with Free Registration using Pro Fo]]> Statistics: Posted by skipshean — September 27th, 2011, 9:17 pm


]]>
2011-09-27T21:09:59-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15231&p=41738#p41738 <![CDATA[Re: [Pro User] Issue/Bug with Free Registration using Pro Fo]]> 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:
<?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!");
            }
    }
?>

Statistics: Posted by Jason Caldwell — September 27th, 2011, 9:09 pm


]]>
2011-09-27T20:35:47-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15231&p=41737#p41737 <![CDATA[Re: [Pro User] Issue/Bug with Free Registration using Pro Fo]]>
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.

Statistics: Posted by skipshean — September 27th, 2011, 8:35 pm


]]>
2011-09-27T18:39:50-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15231&p=41719#p41719 <![CDATA[Re: [Pro User] Issue/Bug with Free Registration using Pro Fo]]> viewtopic.php?f=4&t=14661&p=34114&hilit=w3+total+cache+duplicate#p34114

Investigating further.

Statistics: Posted by Jason Caldwell — September 27th, 2011, 6:39 pm


]]>
2011-09-24T23:48:42-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15231&p=39044#p39044 <![CDATA[Re: [Pro User] Issue/Bug with Free Registration using Pro Fo]]> 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. :)

Statistics: Posted by Cristián Lávaque — September 24th, 2011, 11:48 pm


]]>
2011-09-23T15:45:23-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15231&p=38978#p38978 <![CDATA[Re: [Pro User] Issue/Bug with Free Registration using Pro Fo]]> Statistics: Posted by skipshean — September 23rd, 2011, 3:45 pm


]]>
2011-09-21T22:19:42-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15231&p=38907#p38907 <![CDATA[Re: [Pro User] Issue/Bug with Free Registration using Pro Fo]]>
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?

Statistics: Posted by skipshean — September 21st, 2011, 10:19 pm


]]>
2011-09-21T21:58:23-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15231&p=38906#p38906 <![CDATA[Re: [Pro User] Issue/Bug with Free Registration using Pro Fo]]>
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...

Statistics: Posted by skipshean — September 21st, 2011, 9:58 pm


]]>
2011-09-21T07:22:25-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15231&p=38867#p38867 <![CDATA[Re: [Pro User] Issue/Bug with Free Registration using Pro Fo]]>
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?

Statistics: Posted by skipshean — September 21st, 2011, 7:22 am


]]>
2011-09-20T20:20:11-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15231&p=38830#p38830 <![CDATA[Re: [Pro User] Issue/Bug with Free Registration using Pro Fo]]>
Thanks again for the fantastic speed of response - very impressive!

Statistics: Posted by skipshean — September 20th, 2011, 8:20 pm


]]>
2011-09-20T19:59:41-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15231&p=38827#p38827 <![CDATA[Re: [Pro User] Issue/Bug with Free Registration using Pro Fo]]> 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:
<?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:
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.

Statistics: Posted by Jason Caldwell — September 20th, 2011, 7:59 pm


]]>
2011-09-20T19:41:05-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15231&p=38823#p38823 <![CDATA[Re: [Pro User] Issue/Bug with Free Registration using Pro Fo]]>
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.

Statistics: Posted by skipshean — September 20th, 2011, 7:41 pm


]]>
2011-09-20T19:05:32-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15231&p=38816#p38816 <![CDATA[Re: [Pro User] Issue/Bug with Free Registration using Pro Fo]]> 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.

Statistics: Posted by Jason Caldwell — September 20th, 2011, 7:05 pm


]]>
2011-09-20T17:48:53-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15231&p=38793#p38793 <![CDATA[Re: [Pro User] Issue/Bug with Free Registration using Pro Fo]]>

Statistics: Posted by skipshean — September 20th, 2011, 5:48 pm


]]>
2011-09-20T17:41:05-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15231&p=38787#p38787 <![CDATA[Re: [Pro User] Issue/Bug with Free Registration using Pro Fo]]> Thanks for reporting this important issue.
~ Investigating now.

Statistics: Posted by Jason Caldwell — September 20th, 2011, 5:41 pm


]]>
2011-09-20T16:07:43-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15231&p=38751#p38751 <![CDATA[[Pro User] Issue/Bug with Free Registration using Pro Forms]]>
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!

Statistics: Posted by skipshean — September 20th, 2011, 4:07 pm


]]>