Hi @mcmdev -- I made something that does this:
https://github.com/julianlam/nodebb-plugin-support-forum
Let me know if you run into issues with this plugin, as it is quite old.
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?
Are you using mongodb or redis?
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