Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
All new users have "-1" posts
Avatar
Hulk1977
Member
sp_UserOfflineSmall Offline
Aug 23, 2016 - 10:53 am

All new users, whether created by me or those who sign up themselves, begin with -1 posts. Then they post, they then have 0 posts, then 1, etc.

bug4.jpg

How to fix this, so that everybody would start with 0 posts instead of -1?

Latest versions of everything SP installed (core, plugins, themes).

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Aug 23, 2016 - 12:03 pm

-1 is the correct starting value. It stays at -1 until they visit the forum at which time it is switched to zero. This is the method by which we know they have not visited the forums. After that it accumulates by post made.

So - two possibilities. The switch from -1 to 0 has, for some reason stopped working. Or - it is a display issue. I will check and see which it is.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Aug 23, 2016 - 12:12 pm

No - I am unable to replicate this. The switch to zero is working as expected.

The screenshot looks like the bottom right corner ogf the SP popup profile. Is that right? Did you as admin bring this up for display or did the user?

andy-signature.png
YELLOW
SWORDFISH
Avatar
Hulk1977
Member
sp_UserOfflineSmall Offline
Aug 24, 2016 - 12:47 am

This is the screenshot of a full profile page (center). Loaded it as admin. The user signed up by himself.

Also, I would like to know, precisely how "visited the forum" flag is set - I mean, what are the conditions? Is browsing to the site.com/forum enough for this or some more action required?

Update: today the post count for the same user shows correctly as 0 in both pop-up and full profiles. I'm just surprised it didn't happen instantly or almost instantly. So the question of how exactly "visited the forum" attribute is applied to the user still stands.

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Aug 24, 2016 - 3:24 am

I am unable to replicate it ever showing as -1 on any display - tried them all. The function responsible for displaying the number performs a php max() statement comparing the stored count with a value of zero. So the max() should always return a zero if the stored count is -1 or the actual count if greater than zero.

@mr-papa - can you see a way it could display as -1 as in the attached image (Post #1) ?

As to the question of 'visiting the forum' - it means exactly that. Loading any forum page. 

andy-signature.png
YELLOW
SWORDFISH
Avatar
Hulk1977
Member
sp_UserOfflineSmall Offline
Aug 24, 2016 - 3:53 am

I was asking what specific actions are needed to be performed to set the "visited the forum" flag, because the link to register for my blog is located only on blog.com/forum, nowhere else, and Components -> Login and registration -> Registration redirect is set to blog.com/forum. So no way the user could have avoided visiting at least one forum page (blog.com/forum). Yet yesterday it had shown "-1", and only today it shows "0" as his post count on his profile pop-up and full page.

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Aug 24, 2016 - 4:43 am

I will split this onto three separate parts.

Showing as -1
Let me just repeat - this should never show up as -1 and I would very much like to replicate how it happened. As you have seen above, I have also asked a colleague for input in case they can think of such a scenario. If it continued to stay at that value then I must ask if you have some sort of WP caching plugin active - like W3 Total Cache for example.

When is it switched to 0
It is switched between the determination that the WP page representing the forum display has been requested and the determination of which forum 'view' is required. By this time we have identified the user and checked their credentials, settings etc., To support the profile option of forcing a user to be shown their profile form on their first visit, the post count is checked. If this is found to be -1 and the option is set, the profile form replaces the requested view. If the option is not set, the post count is switched to zero and the page continues to load.

Registration and Login
Your assertion on this depends on how your registration system is set up. So I will assume, in the first instance, that your registration process is standard WordPress or follows the standard model. When the user completes the registration form he is obviously not yet a member. If on completion he is then redirected to the forum page he is still not a member.  He has been sent an email with new user details. He may well be redirected to the forum but he also has not logged in. Until he is logged in, WordPress has no way of knowing who he is. Once logged in and loading a forum page, the switch of his post count will take place as described above. But that can not be on the first forum page load after registration.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Aug 24, 2016 - 11:18 pm

I cannot think offhand of any case where -1 would show up...  I am unable to replicate it as well...  so yeah, if you have repeatable steps, please detail so we can dig in further...

The location where you are seeing that, to confirm, is that the forum header for the user after he is logged in?

no caching?

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: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 617
Members: 17359
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10125
Posts: 79620