Total Number of Posts Blank
-
Minor bug that we've had for some time. It only seems to happen on the largest numbers when reporting. Happens in a couple of places. @julian noticed one or two of them.
-
-
@baris this is what we have...
> db.objects.find({_key:"global"}); { "_id" : ObjectId("53141478ac8fcbecc107086a"), "_key" : "global", "nextCid" : 17, "nextMid" : 29517, "nextNid" : 85655, "nextPid" : 54376, "nextTid" : 3815, "nextUid" : 5966, "postCount" : NaN, "topicCount" : 3624, "userCount" : 5627, "uniqueIPCount" : 16370, "nextEid" : 5 }
-
Something wrong in there that we are getting "Not a Number" even from the DB.
-
You can run the following to fix the counts.
Get total post count
db.objects.count({_key:"posts:pid"});
Store it in the global object
db.objects.update({_key:"global"}, {$set: {"postCount": <insert_value_from_previous_command>}});
You can do something similar for for water closet category
Get number of posts in that category(cid=3)
db.objects.count({_key:"cid:3:pids"});
Store it in category object
db.objects.update({_key:"category:3"}, {$set:{"post_count": <value_from_above>}});
-
Does that fix it just once, or permanently?
-
Appears to be incrementing now. Thanks!
-
@baris said:
Should be permenant yeah, that bug should be fixed post 0.6.0 so if it happens again let us know.
Great, thanks.
Copyright © 2025 NodeBB | Contributors