Forums / Cotonti / Bugs / Whosonline bug

Twiebie
#1 2012-12-12 20:01

I think this bug has been mentioned a few times already on the forums, but I can't recall seeing a solution or a ticket for it.

When a user is logged in on one device and logs in again from another, regardless of the IP, the whosonline plugin has some weird behaviour.

It's back to normal again when you completely log out and log back in again.

whosonlinebug.png


Dit bericht is bewerkt door Twiebie (2012-12-12 20:10, 11 jaren ago)
Trustmaster
#2 2012-12-13 05:18

Oh man, this bug has been there for ages but it's so stealthy nobody ever found the cause. I would literally reward $$$ to somebody who could capture it.

May the Source be with you!
elfrenazo
#3 2012-12-13 06:15

perhaps with some extra ping timeout system

foxhound
#4 2012-12-13 11:27

Ah, I am "glad" to read I am not the only one experiencing this. But I only saw the bug while "building" the website. Nowadays while the site is running I have never encountered it again. But I also have to admit I only visit the site once a day and not multiple times from different locations/devices.

<img src="http://www.armaholic.com/datas/thumbs/green-sea-battalion-uniforms-version-03-preview_4.jpg" alt="green-sea-battalion-uniforms-version-03-" />
Macik
#5 2012-12-15 00:52

I foud some errors in code and may try to fix it. But I need to know logic of its internal accounting:

  • if same user logins from 2 diferent system (different IPs) - does system need to log both of it ?
https://github.com/macik
правильный хостинг — https://goo.gl/fjCa1F
Trustmaster
#6 2012-12-15 10:51
#36543 Macik:

I foud some errors in code and may try to fix it. But I need to know logic of its internal accounting:

  • if same user logins from 2 diferent system (different IPs) - does system need to log both of it ?

Both authorizations are valid, but whosonline should display only 1 instance. But I don't think multiple logins causes this because it seems like it displays the same data for some or all of online users. Consider this example: there are 4 members and 50 guests online, one of the members is Macik. With this bug, it sometimes shows that these 4 members are all Macik, sometimes it shows that 2 of 4 members are Macik, and like it is shown on Twiebie's screenshot, sometimes it would claim 54 Maciks online.

May the Source be with you!
elfrenazo
#7 2012-12-16 23:17

This problem is not relevant, but it is clear that only happens in the users session.

I see no reason to pay for it.

Macik
#8 2012-12-18 01:09

I was fix it. Most of bugs consider same user multilogins and logins from same IP.

Here are log of work:

- deleted duplicate functions load
- fixed query to list guests
- fixed query to update guests info
- fixed query to delete users old info before new login
+ fixed handling same user login from different IP same time than logout
- fixed users count when DB still not updated
- fixed table view with disabled guests info
+ added pagination
* fixed russian lang file
- fixed logic error to update show table before actual update

You can download it for tests as separate plugin from here.

 

 

 

https://github.com/macik
правильный хостинг — https://goo.gl/fjCa1F
Trustmaster
#9 2012-12-18 05:58

Thanks, Macik! The new version is now online here, report bugs if you notice them.

I've noticed that pagination is wrong.

May the Source be with you!
Twiebie
#10 2012-12-18 13:15

Seems to be working fine, Macik!

I've tried logging in from multiple devices on the same IP and on different IP's, but I couldn't reproduce the error mentioned in the opening post.

Only issue I see at the moment is the pagination, which Trustmaster already mentioned.

Macik
#11 2012-12-18 14:22

Yeah, pagination could be done poor, so I'm not familiar enough with it.

What certain error you had found with pagination?  (you can write it here or in issues so I fix it)

Next 2 questions: 

  • does DB fields like `online_shield`, `online_action`, `online_hammer` still actual and being in use?
  • does we gain any advantage in performance if we use DB cache in cases system had not MEM cache?
https://github.com/macik
правильный хостинг — https://goo.gl/fjCa1F
Trustmaster
#12 2012-12-19 18:23

does DB fields like `online_shield`, `online_action`, `online_hammer` still actual and being in use

Yes.

does we gain any advantage in performance if we use DB cache in cases system had not MEM cache?

No, it would have to update on every request anyways.

May the Source be with you!