New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Category count keeps getting out of step #5760
Comments
i have this on my todo list for the cronjobs. We have now a limit recount, because for support shared hostings. I will add cronjob, so users can set it up on their hosting solutions. |
I don't understand - surely when a user does something we can update the stats without excess overhead. Certainly other bbs like phpBB do immediate updating of stats and don't need a cron job. |
Maybe there is a issue with the counting, but i need to know which function doesn't work correctly. If you can try to reproduce the issue, i can fix it. phpbb is a standalone product, we are a extra plugin on joomla, if you have more integrations, you can easily reach the php memory limit, so we need to have in mind, that we don't use to much resources. |
I use the Joomla extension Fabrik which does 1,000 more complex stuff - believe me, if Fabrik runs OK, then Kunena will too. Anyway, we are not talking about integrations here - we are talking about Kunena simply keeping its own basic statistics up to date like how many topics there are in a category. |
@Sophist-UK there is your solution |
i see one issue already with numPosts, when a category with approval, the topic stays correct, but the message count is counted more. @Sophist-UK do you have categories with approval? |
I was just discussing this with my Kunena administrator / global moderator. We also think it might be to do with a category requiring approvals - either on first post of a topic or if user edits the topic already approved and it needs re-approval. |
i couldn't find the issue, so i have added a small hack. it should be working correct now. |
@810 Can you please reopen this issue., My fault for not saying but the stats for the category were the topic count which was on the low side rather than the high side. The "hack" seems to relate to post counts not topic counts, and avoids increasing the count if it is a non-moderator saving into a moderated category, which suggests that it avoids +1 when the post needs moderating. In other words it would fix an issue of category post counts being too high - whereas our issue is topic counts are too low. There are several topic count use cases that need to be handled with moderated categories:
The obvious place to put the fix to topic counts is in the delta() method which is specifically designed to decide how to adjust the category topic count. I would be happy to try to code a fix, but that would be a big learning curve for me. |
Ok - we have done some testing on use case 3. above. Having run Tools / Recount Statistics / Recount Category Statistics a user edited an existing approved topic and the category topic count was adjusted -2!! Note: Not -1 as expected, but -2. When a moderator re-approves the topic, the count is increase +1 - so net having edited and approved a topic is -1. |
Any plans to add the cron job option for recounting statistics? Our site seems to mostly keep up, but on occasion it gets off count and we would really like to avoid having to monitor this constantly. Thanks for any help on this. |
Did this issue ever get fixed? |
Its prepared for K6.0 |
Hi there, Thanks for the update on this. Look forward to having that feature then. Appreciate your quick response! |
This issue is stale because it has been open 30 days with no activity. |
Steps to reproduce the issue
Regular need to run Tools / Recount Statistics / Recount Category Statistics because new topics are not being counted.
Joomla version: 3.8.4
Kunena version: 5.1 RC1 or 2 (now upgraded to RC3)
Php version: 7.1
Database version: 5.6
The text was updated successfully, but these errors were encountered: