Posts Read Discrepancy

Okay, so maybe the numbers don’t mean exactly what I think they do, but the Requirements for TL 3 show I’ve read (all time) 1905 posts.

But if you go to my admin user page, it has 2743. Why the large discrepancy? I’d expect these numbers to match.

2 Likes

Tl3 stuff looks at 100 days for all stats

That can’t be as the two Posts Read statistics would be the same then… There is a Posts Read, which should be the past 100 days, and there is a Posts Read (all time).

As an aside, it shows correctly for Topics, just doesn’t show correctly for Posts.

3 Likes

I can confirm there’s a discrepancy.

The requirements show I’ve read 2,327 posts:

But the admin page shows 3,205:

@sam I think this would be a good bug for me to get my “feet” wet, so to speak. So if you don’t mind it sitting for a while (until my time frees up – should be another week or two), I’ll see if I can’t resolve it :smile:

I’ve got my environment up, now i just need to work through a good way to load up the code.

4 Likes

I’m guessing this might have to do with many of our earlier test posts being deleted in preparation for the official Move? i.e. Deleting posts did not decrement counts…

That would make sense, i suppose, but it seems strange that one total has been reduced and not the other. And I’ve still read those posts, even if they were subsequently deleted. I’d expect my own post count to go down (which I think it did), but not the posts read.

I haven’t had enough coffee yet to give me even a chance to see a connection, but maybe comparing with the dashboard stats can offer a clue?



If @HAWK knows how many Topics and Posts were deleted that should help.

I’m wondering if reading and posting in our private Staff categories is in play here?

I’ve had a look at SuperTed’s stats, which are a bit easier to check, as virtually all his posts have been deleted.

And from the “Activity” section:

19 private topics (as shown under “activity”) matches what he sees in his profile. 2 topics replied to (as shown in the TL3 dialogue) is right, after the test threads were deleted. But almost every thread he was involved in has been deleted. He didn’t have access to the private areas of the forums, so if the “posts read” figure were reflecting the total after the threads were deleted, it should be very much lower. There are not 687 posts remaining in the public area, or anything close to that number.

So I’m playing with this right now in my dev environment and I found something that may be curious. If I create a topic, and read it, it is counted on my activity admin page, but doesn’t seem to be counted on the TL requirements.

I’m still investigating (trying to find ways of reproducing the discrepancy, at least)

Nope, no idea I’m afraid.

@sam

So here is what I discovered (or think I discovered). It seems the info found on the Admin User page (not the TL requirements page), are read from the user_stat table and include deleted posts, posts that have changed ownership, etc.

The TL requirement seems to be based on the user_visits table. Obviously the two must be out of sync.

This is where I’m stuck. I see a call to object.user_stat.send(sym) where sym is posts_read_count, but I haven’t found the send method of user_stat yet. My guess is there isn’t an actual method, it is built into ActiveRecord::Base and it simply reads the column from the table (but that is a guess).

I’m assuming the same is true for posts_read in the user_visits table.

Thoughts?

It’s actually built into Ruby. It’s used when “metaprogramming” and allows the programmer to dynamically call a method on the object (here calling the post_read_count method on the object.user_stat object).

Thanks!

Okay, so the difference in counts is definitely due to the tables being out of sync for those columns. Interesting…

I think we are simply not bumping up read counts for “self created” posts and topics on the user visits table.

I am not sure if its desired or not to bump up these numbers.

They are included in the Total calculation, so if they aren’t part of the User accessed/read/whatever, then that is a big disadvantage for the user… isn’t it?

1 Like

Should reading your own topics and posts count? Reading your own books isn’t the same as reading words other people wrote.

Agreed, but if my posts are included in the right column (number of posts you must read), I’m at a disadvantage if I contributed 200 of those posts in that count (in the last 100 days) and my posts aren’t reflected on the left (for the ones I have read), aren’t I? (than someone who only contributed 30 posts)

Maybe my logic is flawed, but to me it sounds right…

2 Likes