Kunena 6.2.5 & module Kunena Latest 6.0.7 released

The Kunena team has announce the arrival of Kunena 6.2.5 [K 6.2.5] which is now available for download as a native Joomla extension for J! 4.3.x/4.4.x/5.0.x. This version addresses most of the issues that were discovered in K 6.1 / K 6.2 and issues discovered during the last development stages of K 6.2

Topics that are moved into this category are considered to be closed. Users may want to add additional information but these topics should not be resurrected in order to discuss new problems or unrelated matters.

Question Online Users, Problems counter

More
10 years 6 months ago - 10 years 6 months ago #1 by olimpo88
The online user counter, is failing. If a user opens session two browsers, or more than one device. This session is counted 2 times and the number of members does not match the displayed list.






I'm using kunena 3.0.2
Last edit: 10 years 6 months ago by olimpo88.

Please Log in or Create an account to join the conversation.

More
10 years 6 months ago #2 by olimpo88
Configuratión

This message contains confidential information

Database collation check: The collation of your table fields are correct

Joomla! SEF: Enabled | Joomla! SEF rewrite: Enabled | FTP layer: Disabled |

This message contains confidential information
htaccess: Exists | PHP environment: Max execution time: 120 seconds | Max execution memory: 124M | Max file upload: 20M

Kunena menu details:

Warning: Spoiler!

Joomla default template details : shape5_vertex | author: Shape5.com | version: 3.0 | creationdate: Unknown

Kunena default template details : Blue Eagle 2.0 | author: Kunena Team | version: 3.0.1 | creationdate: 2013-06-29

Kunena version detailed: Kunena 3.0.2 | 2013-08-18 [ Nocturne ]
| Kunena detailed configuration:

Warning: Spoiler!
| Kunena integration settings:
Warning: Spoiler!
| Joomla! detailed language files installed:
Warning: Spoiler!

Third-party components: UddeIM 3.0

Third-party SEF components: None

Plugins: None

Modules: Kunena Latest 3.0.1 | Kunena Stats 3.0.1 | Kunena Login 3.0.1 | Kunena Search 3.0.1

Please Log in or Create an account to join the conversation.

More
10 years 6 months ago - 10 years 6 months ago #3 by sozzled
G'day, olimpo88, and welcome to Kunena.

olimpo88 wrote: The online user counter, is failing. If a user opens session two browsers, or more than one device. This session is counted 2 times and the number of members does not match the list.

We agree with you; this is a defect. It's a problem that people have been trying to fix for over five years. It's a well known problem. It's a problem that no-one has successfully solved.

We appreciate your detailed report. As far as I know (and unless there is a better technical explanation) this problem requires a change in the way that Joomla counts connected sessions. When the Joomla people fix the cause of the problem, the Kunena team will be able to resolve the issue as far as Kunena is concerned.
Last edit: 10 years 6 months ago by sozzled.

Please Log in or Create an account to join the conversation.

More
10 years 6 months ago - 10 years 6 months ago #4 by olimpo88
But he could fix doing a LEFT JOIN to have no more than once to members.
Or make a second query to find out how many are repeated and subtract.
I'll see how I do and then tell them.
In which file should I look for to make this change?
Last edit: 10 years 6 months ago by olimpo88.

Please Log in or Create an account to join the conversation.

More
10 years 6 months ago - 10 years 6 months ago #5 by olimpo88
This code fix my problem.
Code:
//Countar miembros $query = 'SELECT guest, time, client_id FROM #__session WHERE guest = 0 AND client_id=0 GROUP BY userid'; $db->setQuery ( $query ); $sessions = (array) $db->loadObjectList (); $user_array=count($sessions);

Must be inserted in /libraries/kunena/user/helper.php before lines
Code:
$result ['guest'] = $guest_array; $result ['user'] = $user_array;










Also you could do something more complicated, and surely this is not the optimal way, but it works. My time of expiration of section is 90 minutes and just wanted to show the guests online in the last 10 minutes.
Code:
$querytime=""; //If you want to put a time different from the system to tell guests uncomment these next 4 lines. //$minutes=10; //$seconds=$minutes*60; //$time = JFactory::getDate()->toUnix() - $seconds; //$querytime = 'AND time > '.$time; //Count guest $query = 'SELECT guest, time, client_id FROM #__session WHERE guest = 1 ' . $querytime; $db->setQuery ( $query ); $sessions = (array) $db->loadObjectList (); $guest_array=count($sessions); //Count user $query = 'SELECT guest, time, client_id FROM #__session WHERE guest = 0 AND client_id=0 GROUP BY userid'; $db->setQuery ( $query ); $sessions = (array) $db->loadObjectList (); $user_array=count($sessions); $result ['guest'] = $guest_array; $result ['user'] = $user_array;

The problem is not joomla, kunena is misusing this session table. With some adjustment can improve it :)

Edit if my English is not very good.
Attachments:
Last edit: 10 years 6 months ago by olimpo88.
The following user(s) said Thank You: Bob Britt

Please Log in or Create an account to join the conversation.

More
10 years 6 months ago #6 by Matias
Thanks for pointing out the issue with online users count. I added it to similar bug report, which can be found from here:

github.com/Kunena/Kunena-Forum/issues/1676

I'm not sure if we can get it into our next bugfix release, though, as we're planning to get it out within few days from now with some important J3.2 fixes.
The following user(s) said Thank You: olimpo88

Please Log in or Create an account to join the conversation.

More
10 years 5 months ago #7 by Bob Britt
Just like to add my "Me To" to this fix. I really don't want to edit any files directly but would love for this to be addressed in bugfix. Thanks
The following user(s) said Thank You: olimpo88

Please Log in or Create an account to join the conversation.

Time to create page: 0.408 seconds