Post count wrong causing issues with navigation and notifications
-
NodeBB 1.9.2.
Basically a couple of related issues which have started happening all of a sudden:
- Post count is incorrect. Example (this thread actually has about 598 posts):
-
(Following on from previous issue) Clicking the "jump to last post" navigation button goes to post 400, not post 598
-
Jumping / scrolling to the bottom of the thread causes additional posts to finally start loading beyond post 400, via infinite scroll. They load pretty quickly and eventually you can reach the end of the thread, but this obviously isn't expected behaviour
-
The same thing happens when notifications are clicked, i.e. if someone posts a new comment in this thread, I get a notification but clicking it takes me to post 400, not their actual recent post:
It's as if some cache or index is not being updated.
Tried rebuilding/restarting with no success. No errors in the logs. Checked "Cache" under Advanced and "Group Cache" was full at one point (Length of 40000). I don't know what this means because there seems to be zero documentation about this.
-
Looks like for whatever reason the postcount is out of sync, you can fix it with a mongodb query and see if the issue is resolved.
Run this in mongo sell replacing the <tid> and <postcount> with the actual values.
db.objects.update({_key: "topic:<tid>", {$set: {"postcount": <postcount>}}});
-