Duplicate User's message count was off

Minor understatement there. :)
Not really.

I've done this for an client with help of the xf_thread_post table, which contains all threadids and the postcount
then i need only to run the canViewThread check for the threadids and sum it up:cool:

Much faster than checking all posts
 
@Mike - I have a simple question - the user Administrator at my site www.gdf.tv posted 3 messages and then deleted them all ... when the messages existed the pop up windows showed 3 messages correctly. But, when all 3 messages were deleted, the message count in the pop up window still shows 3 messages - it should obviously show 0 messages, right?

This is the issue that needs sorting and what I have asked Peter to do?

I don't know all the technicalities of it but the issue is obvious and needs rectification.
 
The messages weren't deleted.

The messages are still in the database.

According to Peter, the forum the messages were in were deleted. This does not remove the messages from the database.
 
The messages weren't deleted.

The messages are still in the database.

According to Peter, the forum the messages were in were deleted. This does not remove the messages from the database.

Maybe it should. Otherwise you end up with orphaned posts floating around with no purpose in life.

/shrugs. We need an option to move or remove them when deleting a node.
 
I'm beginning to think no one ever reads anything.

As stated earlier on, this is resolved in version 1.2.
 
The messages weren't deleted.

The messages are still in the database.

According to Peter, the forum the messages were in were deleted. This does not remove the messages from the database.

So, do you mean that if a member deletes a message that his pop up message count will not automatically reflect the deletion?
 
If a member deletes a message, the post count will be adjusted accordingly.

But that's not what this thread is even about.

A member had a message count of 3, only 2 posts were coming up in search. This is because the third post was in a forum which has been deleted.
 
If a member deletes a message, the post count will be adjusted accordingly.

But that's not what this thread is even about.

A member had a message count of 3, only 2 posts were coming up in search. This is because the third post was in a forum which has been deleted.

Its both issues actually, as Peter started raised this issue here after I initially made him aware that the post counter in the pop up window wasn't working... So, leaving aside the deleted forum/search issue, what does Peter need to do to reflect the user administrator's 3 message count to accurate reading of 0 counts? Just reset the counter?
 
I'm actually guessing that the issue with the admin user will be solved by simply rebuilding the search index, etc.

THAT should be handled by the system, to the best of my knowledge. It's not instant, as @Mike stated, for performance reasons.
 
I'm actually guessing that the issue with the admin user will be solved by simply rebuilding the search index, etc.

THAT should be handled by the system, to the best of my knowledge. It's not instant, as @Mike stated, for performance reasons.

so, you can now just rebuild the search index and refresh (not reset) the counter for the whole site, and thereon the counter will work accurately, now that you have deleted the phantom 4th thread in the database... (Administrator's and Michael Stanger's post counters show messages which don't exist, for example). So, for all members, both from old and on new sites, stats should show accurately.
 
Last edited:
Well, that was the theory, but it didn't work out that way for some reaosn. Administrator shows 3 posts, but no content at all can be found. Not on the forum, and not in the database. Rebuilding user cache anmd search index did nothing to change that. Neither did running the cron jobs.


Update: Apparently both accounts affected by this were brought across with an import. All new accounts work, so I'll manually address these conflicting accounts and leave it at that.

Carry on!
 
Last edited:
Top Bottom