Support Forum
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.
How to fix this, so that everybody would start with 0 posts instead of -1?
Latest versions of everything SP installed (core, plugins, themes).
-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.
YELLOW
SWORDFISH
|
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.
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.
YELLOW
SWORDFISH
|
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.
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.
YELLOW
SWORDFISH
|
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?
Visit Cruise Talk Central and Mr Papa's World
1 Guest(s)