You are using the wrong hook name
action:composer.topics.post => for new topic
action:composer.posts.reply => for new reply
Hello,
I just did the cleaning by delete manually all post and topic in my forum. However, I don't know why now the categories showing negative number of topic and post. Please see the attachment.
How to reset it to 0?
MongoDB
I am not familiar with this
In mongo cli, for each category you have to run the below query replacing the correct values.
db.objects.update({_key: "category:<replace_category_id>"}, {$set: {"topic_count": "<replace_correct_topic_count>", "post_count": "<replace_correct_post_count>"}});
@baris said in How to reset the counting of topic and post each categories:
In mongo cli, for each category you have to run the below query replacing the correct values.
db.objects.update({_key: "category:<replace_category_id>"}, {$set: {"topic_count": "<replace_correct_topic_count>", "post_count": "<replace_correct_post_count>"}});
This works like a charm