Page 1 of 2
Free Registration Numbers Wrong
Posted:
August 23rd, 2011, 1:16 pm
by seofeed
Once again, love the plugin and anyone reading this should buy the pro version.
This is really odd. We have a free level setup with label: Free Trial. S2Member and WordPress is reporting 21 members at that level, but when I count the actual number of people listed it is 13. I tried optimizing the database and nothing was wrong there. Any idea what the problem is?
Re: Free Registration Numbers Wrong
Posted:
August 23rd, 2011, 10:18 pm
by Cristián Lávaque
Thanks again for the kudos!
Where are you getting this wrong count, the users list at
WP Admin -> Users -> All? Do you get the wrong count for other levels as well?
Re: Free Registration Numbers Wrong
Posted:
August 23rd, 2011, 10:35 pm
by seofeed
Yes, that's where I'm looking. No, the other levels are correct. I'm wondering if it's still counting deleted users.
Re: Free Registration Numbers Wrong
Posted:
August 24th, 2011, 12:08 am
by Cristián Lávaque
I see. Could you test creating a new user, checking the count again, then deleting the user and see what happens to the count, please?
Re: Free Registration Numbers Wrong
Posted:
August 24th, 2011, 12:14 am
by seofeed
Added and deleted and it worked fine. Plus, new users coming in affect the numbers appropriately. It seems as if there are something orphaned somewhere in the database. Like several users I setup and deleted are still being reflected in the count for some reason
Re: Free Registration Numbers Wrong
Posted:
August 24th, 2011, 12:28 am
by Cristián Lávaque
Weird.
Have you tried looking for the code that comes up with the count and see where it's getting it from? That should help find where the offset is coming from.
Re: Free Registration Numbers Wrong
Posted:
August 26th, 2011, 1:25 pm
by seofeed
No, I haven't but that makes perfect sense. Will investigate more and let you guys know later.
Re: Free Registration Numbers Wrong
Posted:
August 26th, 2011, 11:33 pm
by seofeed
Ok, I've had a chance to look into this more. It seems to be nearly doubling up numbers now. I count 33 registrations but the free trial has it listed at 59. When I just deleted a test one it went from 61 to 59 so it deleted "2" users.
The link for Free Trial is:
http://domain.com/wp-admin/users.php?role=subscriber so that's correct. Another important note is that it's only listing 11 users on a given page. Once again this only applies to the free registration option.
The wp_users table in the database only shows 130 users which is correct and makes up the difference for the extra users shown in the count.
As for the source code in users.php it is standard and nothing has been messed with there. Here are the other plugins we have installed:
http://screencast.com/t/5wTURaUPxxI'm lost. No idea on this one.
Re: Free Registration Numbers Wrong
Posted:
August 27th, 2011, 1:19 am
by Cristián Lávaque
Maybe W3 Total Cache?
Re: Free Registration Numbers Wrong
Posted:
August 27th, 2011, 1:27 am
by seofeed
I went through and deactivated all plugins and it was still reporting incorrectly.
Re: Free Registration Numbers Wrong
Posted:
August 27th, 2011, 1:41 am
by seofeed
Also tried switching to the default theme and that didn't work either.
Re: Free Registration Numbers Wrong
Posted:
August 27th, 2011, 3:07 am
by Cristián Lávaque
Could you please post screenshots of these? The count as well as the full list of users that correspond to that count? Blurring out any private info, of course. Thanks!
By the way, not sure if this has anything to do, but you can change the number of users listed per page from the Screen Options tab in the top-right corner of the Users list page.
Re: Free Registration Numbers Wrong
Posted:
August 27th, 2011, 2:39 pm
by seofeed
Here's the screenshot:
- Users page
Re: Free Registration Numbers Wrong
Posted:
August 27th, 2011, 11:02 pm
by Cristián Lávaque
I see, very weird. You have it set to 20 users per page, but only 11 are listed in page 1, yet you have 4 pages as is correct for the count of 63 users.
I'll ask Jason what could be causing the problem if it's not a plugin conflict.
Re: Free Registration Numbers Wrong
Posted:
August 27th, 2011, 11:07 pm
by seofeed
Ok, thanks. It actually should be only two pages because it's only like 35 free trial users. Remember, all the extras that are in there so it's actually reporting pages wrong as well.
Re: Free Registration Numbers Wrong
Posted:
August 29th, 2011, 8:02 pm
by Jason Caldwell
Thanks for the heads up on this thread.
@seofeed: Are you running a Multisite Network? If so, see if you can go into your Network Admin panel and make better sense of this. I believe there is a bug in the WordPress core that can cause this, but I've only seen this happen on Multisite Network installations, where Users existed, but were not actually a part of a certain Blog ( i.e. you may actually have X number of Users, but some of them were removed from the Blog you're working with, thereby placing them into limbo in the Network Admin panel ). That is, they exist in the database, but some Users may have no access to any of your Blogs in the Network.
Please confirm that you are on a Multisite Network, and then we'll take a closer look to see if I'm correct, and if anything can be done to work around or improve this.
Re: Free Registration Numbers Wrong
Posted:
August 29th, 2011, 10:50 pm
by seofeed
Hey Jason, unfortunately not on Multisite. It's a plain old setup with the Optimize Wootheme and backed by S2Member.
Re: Free Registration Numbers Wrong
Posted:
August 30th, 2011, 4:04 pm
by Jason Caldwell
Thanks for the follow-up.seofeed wrote:Hey Jason, unfortunately not on Multisite. It's a plain old setup with the Optimize Wootheme and backed by S2Member.
Gotchya. Hmm, that's not good then, it's beginning to look like maybe your database has become corrupted somehow. Let's take a look at this first though...
Please create this directory and temporary file:
/wp-content/mu-plugins/s2-hacks.php
- Code: Select all
<?php
add_action("init", "s2_debug");
function s2_debug(){
echo count(get_users("role=subscriber"));
}
?>
Now load up your site and see what the count shows. Is it right, or wrong? Also, you might try changing the Role value to see other counts. For instance:
s2member_level1, s2member_level2, s2member_level3, etc. Also see:
http://codex.wordpress.org/Function_Reference/get_users
Re: Free Registration Numbers Wrong
Posted:
August 30th, 2011, 8:41 pm
by seofeed
It shows the same wrong number that I see on the users page. The other levels report correctly. I've tried running repairs on the database and all tables have reported ok.
Re: Free Registration Numbers Wrong
Posted:
August 30th, 2011, 10:28 pm
by Jason Caldwell
Hmm. That's really weird. Did you at any point have Multisite Networking enabled for WordPress?
Re: Free Registration Numbers Wrong
Posted:
August 31st, 2011, 12:42 pm
by seofeed
No, never been enabled. I just see this text in Multi-site config for S2Member:
Your WordPress® installation does not have Multisite Networking enabled.
Which is perfectly OK
Multisite Networking is 100% completely optional.
Re: Free Registration Numbers Wrong
Posted:
August 31st, 2011, 12:54 pm
by Jason Caldwell
OK. Thank you. It's really starting to sound like a corrupted database to me. I would suggest that you use your hosting control panel to locate the phpMyAdmin interface for your server. This will allow you to investigate the
wp_users table directly, and perhaps you can make since from that approach.
Either that, or if you have s2Member Pro, pull an export of all Users and examine the resulting file. With s2Member Pro installed, this tool is available in your Dashboard, under:
s2Member -> Import/Export.
Re: Free Registration Numbers Wrong
Posted:
August 31st, 2011, 1:43 pm
by seofeed
I have the Pro Version. Can this conversation go private so I can share more information with you easily?
We're making progress now. The wp_users reports the correct number of users.
But S2Member says it is 209 users (users page):
The export says it is 209 members as well:
Now, the issue I found when exporting. Every one of the subscriber role members are listed twice and what's more is their first name and last name is missing. Their display name shows up but the firstname, lastname field is empty. Obviously, these dupes in S2Member are causing the wrong numbers to be reported.
This is only an issue with the subscriber role. It works fine for every other role. So we've found the problem. Now, how to fix it and prevent it from happening in the future?
I can't upload a screenshot because it would contain usernames, names, etc... I can send it somewhere if you want me too.
Re: Free Registration Numbers Wrong
Posted:
August 31st, 2011, 10:02 pm
by Jason Caldwell
OK. Great. Thanks for reporting back.This is the first time that I've seen this reported, and it is indeed very strange. My first thought would be that you had a plugin conflict on your site at one point, which has damaged the integrity of your database somehow. It's hard to know for sure though. Yes, if possible, please send me access to your phpMyAdmin interface via this private contact form so we can take a look:
http://www.s2member.com/contact/
Re: Free Registration Numbers Wrong
Posted:
September 1st, 2011, 3:34 am
by seofeed
Sent, thanks!