Simple Machines Community Forum

SMF Support => SMF 2.1.x Support => Topic started by: Bigguy on October 22, 2018, 08:08:39 PM

Title: 2.1 stats
Post by: Bigguy on October 22, 2018, 08:08:39 PM
I think I found another bug. My members have noticed that the stats are not right. One of them has started 62 topics on the site and is not listed in the top topic starters list in the stats. Out of the people that are listed there, 6 or 7 have less than 10 topics started. Also most time online is not right. I have spent every day for the last 9 months on the site and it shows me as online for 42 days. Something is wrong with the stats... :'(
Title: Re: 2.1 stats
Post by: Aleksi "Lex" Kilpinen on October 23, 2018, 12:40:30 AM
Interesting, and not good if the stats misbehave.
I guess you have checked all relevant settings?
Tried to empty caches?
Title: Re: 2.1 stats
Post by: shawnb61 on October 23, 2018, 01:08:04 AM
I'd start with:
- Recount all forum totals & statistics
- Find & repair any errors

Both under Admin | Maintenance  | Routine

Title: Re: 2.1 stats
Post by: Arantor on October 23, 2018, 03:03:46 AM
42 days is about right, actually, because it isn't how many days total, it's that SMF has added up how long you've been around the site and that in total works out as 42 consecutive days if you added all the online time together.

Just like how it has always worked, in fact.
Title: Re: 2.1 stats
Post by: Bigguy on October 23, 2018, 06:53:25 AM
I have done all the maintenance and all the. The stats are acting up. We have 6000 posts and over 1000 topics. Something is wrong with them. Amazing how ya' s come on here and ask me if I have done maintenance or not. Like really. Go check the stats your self. It's great having to prove every damn thing I say because after 10 years of being here I still have no idea what I am doing....right.
Title: Re: 2.1 stats
Post by: Arantor on October 23, 2018, 07:39:04 AM
Well, if you made the stats available to guests, maybe we could check them out.

Though be careful with the "I've been here x years" line especially when making claims that are demonstrably incorrect...
Title: Re: 2.1 stats
Post by: shawnb61 on October 23, 2018, 09:00:31 AM
FWIW, my 2.1 stats look fine, but they're very simple; I don't have a prod site on 2.1 with active users.

In a way, you're a canary in a coal mine.

& You didn't describe steps taken, etc.  We don't know what you don't report.

Title: Re: 2.1 stats
Post by: Gwenwyfar on October 23, 2018, 09:43:31 AM
Quote from: Arantor on October 23, 2018, 03:03:46 AM
42 days is about right, actually, because it isn't how many days total, it's that SMF has added up how long you've been around the site and that in total works out as 42 consecutive days if you added all the online time together.

Just like how it has always worked, in fact.
Which adds to roughly 4 hours of activity per day in 9 months, though I don't know how exactly SMF decides "inactivity".


My stats also look fine, but I only have some dozen posts and 3 users. Are any of those topics in child boards perhaps?

Edit: Actually, my stats are missing the 1 topic I have in a child board, as well. So maybe there's the issue.
Title: Re: 2.1 stats
Post by: Bigguy on October 23, 2018, 04:22:12 PM
There were no steps to create it. Just use your forum the way it should be. Go to someone's profile and see how many topics they have started. Now if there total is high enough to be on the stats page under the heading "Top Topic Starters" Than it should be there. Well I have members that should be on a few lists and they are not. One member has 62 topics and is not on that list.

I was going to post screen shots of the stats area but because these are member stats I did not. I have not asked them if it's ok. I don't care about mine but my members privacy is important to me, and to them I would think. It doesn't make sense the way it is. If you look at Top Topic Starters in stats.

I have 10 members listed under that heading. If the topics go like this in order from most to least (actual numbers)

764
43
38
13
7
2
2
1
1
1

Where is the member that has started 62 topics listed ?? Cache and all forum maintenance gets done daily. Sometimes more than once a day so I know it is not that. Any edits I have done are to css mainly. the mods installed have not effected the stats at all.

As for Most time online. Why would it not count ALL the time someone spends online. That makes more sense. I certainly know I have spent more time than 4 hours a day at my site....more like 6 to 8 hours a day and more on weekends.
Title: Re: 2.1 stats
Post by: Arantor on October 23, 2018, 04:27:36 PM
QuoteWhy would it not count ALL the time someone spends online. That makes more sense.

It counts what it can based on you visiting the site. But unless you don't have a job, you're not on your site continuously for 6-8 hours a day which is what it's measuring, the actual amount of time you spend interacting with the site. Just because you have a tab open doesn't indicate that you're actually online on the site.

But this also requires you understanding something about how the site works, which is namely that it's not a constant connection monitoring you - it works off the times you actually click on something and visit the site and follow links around the site. If you read a really long topic, it's possible (though somewhat unlikely) that it will under-report. However this will be your cue to misunderstand how any of this works, again, and declare that it needs to be fixed, despite not having noticed it be 'wrong' for a decade. (Because it's not actually wrong, it's a reasonable implementation of calculating the actual time you've spent interacting with the site.)
Title: Re: 2.1 stats
Post by: Bigguy on October 23, 2018, 04:43:28 PM
QuoteThough be careful with the "I've been here x years" line especially when making claims that are demonstrably incorrect...
What is incorrect. What I am telling you right now. No it's not. How long I have been here, ok maybe it's been more than 10 years, maybe a week short of 10 years, who knows. I forget now. Go look at my profile if you want and check it out. The point is after spending this amount of time here you would think I would get a bit more than just "Have you done maintenance". I know how to run SMF. I have been doing it long enough. I have beta tested for various mods and helped out on some. I know a bit about css and I know how to edit code. Not write it sadly but that is more due to no time than anything else.

I'm not really mad just a bit disappointed is all. Even not being on the team I spend time trying to find bugs in 2.1, like I am now. I keep my eyes and ears peeled on GH to try to stay as up to date as possible. Some people here though would tell you its a bad thing. What I do. I don't know all the terms for php or css for that matter, but I do know SMF and how it's supposed to act and what it is supposed to do. So what claims have I made that are so incorrect you feel the need to bring them up now....


EDIT: (Arantor posted while I was typing):
It's not just that the tab is open it's that I am interacting with the site. Unless I am here or at GH lookin around. I don't do a whole hell of a lot more these days. My time is spent on the site posting or behind the scenes doing something. I barely stay inactive there. Even when no one is online.

I did notice the time online thing a long time ago and posted about it. I thought it was wrong waaay back then and I still think it is wrong now. I know how it works and that it was set up that way. I just think it should count all the time online a user is there on the site. That's all.
Title: Re: 2.1 stats
Post by: Arantor on October 23, 2018, 04:53:36 PM
You know SMF so well that the behaviour you're trying to argue is broken is unchanged since the start of SMF and has literally always worked the way it currently does, namely every time you hit the site, it adds some time to your profile based on time between the last visit and the current visit - because that's literally all it can ever do.

There is no constant connection monitoring, so literally all the software can do is note the difference between 'last time you were here' and 'now' and try to judge how long online that constitutes, because if you refresh the page after 8 hours with nothing in between, there's no way that you've been online all that time. So, again, unless you have literally been *actively* in front of the computer tapping at your site for 8 hours, it should NOT count 8 hours!

As for you having been here sufficiently that you think people shouldn't ask you the idiot ball questions, everyone else is doing absolutely the correct thing precisely because people like us that are veterans are in fact the group of people most likely to make assumptions about what we think we've done and whether it's relevant. The number of times I've had people who swear black is blue that they've run maintenance but swear the problem is still there - and curiously goes away when *I* run maintenance... I distrust all user reports, especially from veteran users unless they specifically and emphatically tell me up front what they've done. If they don't tell me up front that they've done x, y and z, I assume from so much bitter experience that none of x, y or z have been done. Interestingly this problem is not just confined to SMF and I get to bill people $100-$200 when I have this argument out in the ol' day job.

(Also: most of the maintenance has nothing whatsoever to do with most of the stats, but that's another story.)
Title: Re: 2.1 stats
Post by: Bigguy on October 23, 2018, 05:11:25 PM
I was going to ask why you talk to people like this but you answered that for me. You don't trust anyone to know even a bit about what they are talking about. Man I am sorry. I didn't realize you were THIS bitter.  If you are trying to help people than you have to realize that most of them don't know how to explain things in YOUR terms all the time...most of the time I guess. That's not their fault but you blame them for it.

I have been here for years helping people out and I have never posted to people like you do sometimes. I don't see the harm in having a bit of patience with people and asking questions instead of talking to them like you have been with me today.
Title: Re: 2.1 stats
Post by: Arantor on October 23, 2018, 05:19:31 PM
I'm mostly only bitter with you because every conversation I have with you ends the same way - you start out making assumptions and assertions that are wrong, based on misunderstandings about how it works, don't want to be corrected by someone who actually understands how it works and then you continue to argue based on your misunderstandings for a thing that doesn't work how you think it does. It seems that the only way I can actually get you to acknowledge anything I say is to be rude to you. But I'm sure that's my problem, not yours. Notice that other people who aren't me take the same position as me without me even doing anything, I wonder why that might be.

I'm perfectly willing to admit there's a problem with the rest of the stats, but I don't know if that's a bug in the code or bad data (and it could be either), but since you ignored the one point that might have made a difference (namely, you want people to investigate your site stats but guests can't see the stats), it's kind of hard to help you. But that's just more of the reason I'm bitter - even on the occasions I actually bother to reach out to you, knowing it will likely end badly, it just seems like you're not willing to listen to anyone unless they already support the viewpoint you have, rather than starting out from a neutral standpoint.
Title: Re: 2.1 stats
Post by: Aleksi "Lex" Kilpinen on October 23, 2018, 05:42:14 PM
If we put aside the time issue, that I know is a feature where mileage will vary, the top lists should be simple numbers - that one I would be interested to hear more of. Are all the topics in main boards? Are all the topics still accessible?
Title: Re: 2.1 stats
Post by: Arantor on October 23, 2018, 05:43:52 PM
I'd also be interested in the database contents of the topics table for those topics, specifically whether the id_member_started is correct.
Title: Re: 2.1 stats
Post by: Bigguy on October 23, 2018, 05:54:24 PM
I agreed with you about the time online. I told you I knew that is how it was supposed to work. Not in those exact words but I think it was clear enough. I have always thought that the way it works was wrong. That's just my opinion, take it or don't that's up to you and everyone else. What I am telling you about that particular stat is that I think it is wrong in how it is reporting the time the way it is supposed to work. I am busier on my site than what you think. OK, I may not be pushing keys constantly for 6 to 8 hours at a time but I do interact with it all the time and more than what it shows. That's all man. So there is two parts to this.

I understand how it works and I think it should be changed AND I think the way it IS working is broken and not reporting the right time online.

I don't want people to investigate my site stats, those are for members. That's why you can't see them. All these people with test sites out there should be able to see what I see. If they have enough activity going on. And I would think that when someone posts a bug that is what they do is go out and try to find it before it is confirmed. I have posted a few bugs up to GH and here and always someone, mostly from the team, will jump in and say "confirmed I found what he was talking about". So why do I have to show a sensitive area to all just to prove what I am saying. I have enough screenshots posted up of other areas of the site. Also, like I said. I didn't ask my members if I could post that info.

I'm not trying to fight with anyone here. Just simply reporting what my members and I found. These posts were not said in a rude tone on my part. Maybe people take it that way from me sometimes. I don't know. This argument in my eyes is over.

EDIT: Two posts while I was typing.

@Lex: I think they are in a combination of main boards and sub boards

@Arantor: If there is something you wish me to look for in phpmyadmin I would be happy to do so if you tell me what it is I am looking for. I'm not an expert on phpmyadmin though so keep that in mind please.
Title: Re: 2.1 stats
Post by: Gwenwyfar on October 23, 2018, 06:09:12 PM
And since you prefer arguing over trying to get your issue found, I wil repeat...

Quote from: Gwenwyfar on October 23, 2018, 09:43:31 AM
My stats also look fine, but I only have some dozen posts and 3 users. Are any of those topics in child boards perhaps?

Edit: Actually, my stats are missing the 1 topic I have in a child board, as well. So maybe there's the issue.


That aside, I agree with Arantor as well. Regardless of how long you've been around, you can't expect us to guess any steps you took (or not). And even if I knew you were capable, everyone is also usually capable of forgetting to do Y or Z, and that's fine. But nobody likes to chase issues blindly. Assuming what is unknown is rarely very wise.

It's appreciated what you're doing on bug reports, but even among team members we will expect and ask about all details and relevant steps taken.

Quotethese people with test sites out there should be able to see what I see. If they have enough activity going on. 
Except we don't,  because we're running simple test sites, with no real users.

And you could always censor user names and topic titles to share the data.
Title: Re: 2.1 stats
Post by: Bigguy on October 23, 2018, 06:25:11 PM
I did see your post. I am sorry I didn't answer. I am glad that someone has this issue as well. It doesn't mean it's confirmed I understand that but at least I am not alone. I get the questions you ask. I do investigate when these issues come up. Most of my members are users from SMF. They also have ideas we check out. I try to come with enough info that someone can find the bug and go from there. I can't search code and pick out lines and database stuff and all that so I do the best I can. Well, I can sometimes thanks to the error log and stuff. I don't understand it all of it that much.

EDIT: I didn't see the last half of that. This is why I do this on a production site. test sites get limited use and can only find a bit of what is there. I know I may have to start over when RC1 comes out but hey, I've done it before. Usernames would be enough to sensor but you already really have the list in one of those posts. I'll see what the few that do post say and post up screenshots if I can.

(None of that was said rude at all.)
Title: Re: 2.1 stats
Post by: Gwenwyfar on October 23, 2018, 06:43:27 PM
I don't think users would be too happy with the random settings and constantly broken features, besides a plain forum :D But I see your point. I considered making a beta version of my forum as optional to users, with a copy of their data. Now that's not even really an option.
Title: Re: 2.1 stats
Post by: Bigguy on October 23, 2018, 06:49:21 PM
It's really nice to see it in action. Especially all the progress that has been made since I opened the site again 9 months ago. Some users like finding bugs, lol. ;)
Title: Re: 2.1 stats
Post by: Gwenwyfar on October 23, 2018, 07:02:03 PM
I purposely break things and make silly tests, so that goes beyond your common bugs ;) I think the menu on mine is still mostly unusable since last time I edited it. That's not something you can do on production.
Title: Re: 2.1 stats
Post by: Bigguy on October 23, 2018, 07:12:13 PM
No your right there, lol. Sounds like a lot of fun actually. I do play around with the css a bit but for now I will leave it to that. After RC1 than I will play a bit more.
Title: Re: 2.1 stats
Post by: GigaWatt on October 23, 2018, 07:21:53 PM
@Bigguy: I actually kinda like Arantor's sarcastic tone in some threads ;)... I guess mostly because it's something I could probably never do... or at least not be successful at it.

Also, in my limited knowledge, for the way you'd like the site to count time online, the site has to reload itself at least 6 times a minute (that's 360 times an hour) in order to maintain a "semi" continuous connection with you as a user. That puts real stress on the servers and the user's browser and if you insert code like that, especially on busy forums that don't run on a dedicated server, this might overload the server, not to mention waste bandwidth (reloading the same thing over and over 360 times an hour).

About that stats issue (top poster and all that), I'll see if I can upgrade my main forum on a test site during the week or the weekend ;). It wouldn't get any new posts (the domain will be locked), but I can see if the stats from all of the previous posts are correct ;). Is that good enough?
Title: Re: 2.1 stats
Post by: Bigguy on October 23, 2018, 07:32:10 PM
If that's something you wanna take time at doing that's great. All I'm trying to do is tell ya what we found. If you guys can't find it then...I guess we were wrong. I don't think we are though. From the stats I posted there should be others in that list that are not there. Gwenwyfar was sayin she has noticed a problem and Arantor didn't count out the topic bug. More confirmation on it would be awesome I think.
Title: Re: 2.1 stats
Post by: GigaWatt on October 23, 2018, 07:42:59 PM
OK, I'll see if I can do it during the week. If not, there's always the weekend ;).

Will post here with results ;).
Title: Re: 2.1 stats
Post by: Bigguy on October 25, 2018, 06:55:54 AM
One pic of the stats page and one of the member in questions profile. Member has 63 topics and not on the list.
Title: Re: 2.1 stats
Post by: GigaWatt on October 25, 2018, 08:50:21 AM
See, that wasn't so hard, was it ;).

I finished uploading a backup of my forum on a test site, I'll see if I can run the upgrade tonight ;).
Title: Re: 2.1 stats
Post by: Bigguy on October 25, 2018, 12:37:08 PM
None of it was hard. I never said that. I said I had to ask my members.
Title: Re: 2.1 stats
Post by: GigaWatt on October 25, 2018, 09:09:42 PM
OK, I did the upgrade, and there was something weird. As in your case, one of my members wasn't showing on the Top Topic Starters list, though he is on the Top Topic Starters list on 2.0.15.

(https://i.postimg.cc/66xbgD1R/SHOT8704.png)

The user is a mod, if that makes any difference.

There are also some other anomalies, like the number of New Topics and New Posts, but I haven't checked if this is correct (if there are any topics or posts missing). This might have happened during the conversion process... will have to check after I recalculate statistics, see if the same numbers appear again.

Note for all of those converting their forums: It does take some time to convert the attachments, so don't lose hope, it'll finish eventually ;).

Though, there is one positive thing that happened after the conversion :). It revealed the orphaned attachments and thumbnails no longer used (I had thumbnails enabled and then disabled it, but it doesn't clean house and delete the ones already created), so now, I can do a little bit of a clean up on my forum :).
Title: Re: 2.1 stats
Post by: live627 on October 26, 2018, 12:12:56 AM
Quote from: Bigguy on October 25, 2018, 06:55:54 AM
One pic of the stats page and one of the member in questions profile. Member has 63 topics and not on the list.
First!1

/me disengages youtube comment mode

I call bug. Will look into it.
Title: Re: 2.1 stats
Post by: live627 on October 26, 2018, 04:58:04 AM
Modified Stats.php attached. Can we fix it?
Title: Re: 2.1 stats
Post by: GigaWatt on October 26, 2018, 07:32:23 AM
The attached Stats.php seems to have fixed the bug, now the member is showing in the Top Topic Starters stats ;).
Title: Re: 2.1 stats
Post by: live627 on October 26, 2018, 07:40:42 AM
Splendid. BTW, the first quote in your signature describes Tetris.
Title: Re: 2.1 stats
Post by: Bigguy on October 26, 2018, 08:44:18 AM
That fixed the error with the top topic starters. Awesome.
Title: Re: 2.1 stats
Post by: live627 on October 26, 2018, 02:35:36 PM
Neat! I'll submit the patch now.
Title: Re: 2.1 stats
Post by: Aleksi "Lex" Kilpinen on October 26, 2018, 02:56:26 PM
Thanks for the report Bigguy, and for the fix live one :)

P.s. what was wrong?
Title: Re: 2.1 stats
Post by: GigaWatt on October 26, 2018, 06:30:24 PM
The Top Topic Starter stats were incorrect, the second most active topic starter was always missing from the list ;).

Quote from: live627 on October 26, 2018, 07:40:42 AM
BTW, the first quote in your signature describes Tetris.

LOL :D, that's not the point of the quote... well, at least not entirely :P.
Title: Re: 2.1 stats
Post by: live627 on October 26, 2018, 06:43:16 PM
I know, but coincidences are funny sometimes. Ayy.
Title: Re: 2.1 stats
Post by: Aleksi "Lex" Kilpinen on October 27, 2018, 12:55:11 AM
Quote from: GigaWatt on October 26, 2018, 06:30:24 PM
The Top Topic Starter stats were incorrect, the second most active topic starter was always missing from the list ;).
That I kinda figured, but I meant more like why it did that? :P
Title: Re: 2.1 stats
Post by: GigaWatt on October 27, 2018, 02:10:11 AM
Don't know ???. I was actually kinda curios myself, since in both cases, Bigguy's and mine, the second most active topic starter was missing from the stats ???. Not the first, not the last, but the second one ???.

Maybe live627 can shed some light on the subject ;).
Title: Re: 2.1 stats
Post by: albertlast on October 27, 2018, 03:31:43 AM
let me bringt light to the dark,
for $reason we pull/query the top 20 topic starter guys (ther user id).

In the next query we call the userdata from this (mostly ther username),
but with the limit of 10.

This get us to the "funny" state that we know what the highest count of topic starter is,
because we get this from the first query,
but the name get lost because we only show $random 10 of 20 without order.

when you look at the pr of me,
you see needed changes are low: https://github.com/SimpleMachines/SMF2.1/pull/5091/files
Title: Re: 2.1 stats
Post by: GigaWatt on October 27, 2018, 01:46:18 PM
Quote from: albertlast on October 27, 2018, 03:31:43 AM
let me bringt light to the dark,
for $reason we pull/query the top 20 topic starter guys (ther user id).

In the next query we call the userdata from this (mostly ther username),
but with the limit of 10.

This get us to the "funny" state that we know what the highest count of topic starter is,
because we get this from the first query,
but the name get lost because we only show $random 10 of 20 without order.

Yeah, but in both cases, the second most active thread opener was missing, that's not random ???.

Sorry. Actually in Bigguy's case, the second most active thread opener was missing, in my case the most active thread opener was missing.