Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
coding-topic
Little trouble with member counter
Avatar
Weltall
Member
Free Members
sp_UserOfflineSmall Offline
Apr 22, 2015 - 6:12 pm

hello there

I have this problem: I tried to import a phpbb database to simple press, but it stopped during the process (server host problems)

So i decided to build from zero my forum, deleting all DB entries (mainly user entries). While there is no user in my database, members usergroup count shows previus member number.

Is there any way to reset this counter or sync with the actual members number?

Immagine.jpgImage Enlarger

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Apr 22, 2015 - 8:17 pm

how did you remove the users?  if you did it in the db, did you also remove all the extended user info in the sfmembers table?   that is where the count is going to come from...

if you deleted the user through the wp api, it would have also removed the sfmembers add on data...

Avatar
Weltall
Member
Free Members
sp_UserOfflineSmall Offline
Apr 23, 2015 - 3:44 am

Yes I deleted all DB entries in member table, then unistall and reinstalled plugin.

I did anything on sfmember table but it seems to have only current users data.

How I could resolve? I have a dozen of users right now since we are migrating from another forum, so I could make a backup of the table and delete all entries if It is needed

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Apr 23, 2015 - 4:20 am

Francesco Di Capua said
Yes I deleted all DB entries in member table, then unistall and reinstalled plugin.

'Member' table? Do you mean the WordPress Users and Usermeta tables?

And  by 'Uninstall' do you really mean a full uninstall using the uninstall option of Simple:Press or do you mean deactivate and reactivate which are very different things?

I did anything on sfmember table but it seems to have only current users data.

So when on the User Groups listing (as per your screenshot above) if you click on the 'Show' button what does the listing actually show?  483 names or 12? If 483 then they must be in the sfmembers database table.

How I could resolve? I have a dozen of users right now since we are migrating from another forum, so I could make a backup of the table and delete all entries if It is needed

A proper and full uninstall of Simple:Press will remove all of the SP data if that is what you want to do.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Weltall
Member
Free Members
sp_UserOfflineSmall Offline
Apr 23, 2015 - 4:34 am

Hello and thanks for answer

Yes, user and usermeta tables are fine, with the correct numbers of users.

The unistall was a clear unistall, using the simple:press unistaller (activate unistall option, deactivate plugin, then delete)

In the user group listing I see just 12 members, the sfmember is fine too.

It's just that counter...

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Apr 23, 2015 - 4:55 am

The SQL behind that value is simply:

SELECT COUNT(*) FROM XXX_sfmemberships WHERE usergroup_id = 2

and of course where XXX is your WP table prefix.

Can you take a look in that table and see what is in there? Were these users already in the WP Users table when you re-installed SP?

andy-signature.png
YELLOW
SWORDFISH
Avatar
Weltall
Member
Free Members
sp_UserOfflineSmall Offline
Apr 23, 2015 - 5:05 am

Woah!

It returns me 500 as value

So that table is the problem.

If I delete all entries there, will I loose also WP users or just forums one?

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Apr 23, 2015 - 5:08 am

If you delete the table manually then you will not lose any users at all. You will just lose the association of those members in your user groups. And they are easy enough to re-instate. Just use the Map Users to User Group option from the admin menu which can rebuild them simply.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Weltall
Member
Free Members
sp_UserOfflineSmall Offline
Apr 23, 2015 - 5:15 am

Thanks!

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Apr 23, 2015 - 8:38 am

Hope you get it sorted OK

andy-signature.png
YELLOW
SWORDFISH
Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 639
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 616
Members: 17342
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10116
Posts: 79581