MyBB Community Forums

Full Version: Replies to topic shows 1 instead of 0
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I didn't notice this behaviour before, but is this the default when there's only 1 post in a thread? The number of replies is generally shown as 0 instead of 1 in other forum software.

I converted a vbulletin 3.6 board and I was wondering whether it was a converter issue.
Must be a bug. Doesn't do it here or other forums.

So it's not default behavior. Tried recounting, rebuilding cache, etc?
Tried rebuilding all stats. It shows 0 replies on some threads and 1 on others. When all those threads have only 1 post (the topic post).

Check here: http://literaryforums.org/forums/news-an...-f-13.html
URL where we can see it??
Check link here:
http://literaryforums.org/forums/news-an...-f-13.html

This topic shows 1 replies instead of 0:
http://literaryforums.org/forums/importa...t-151.html

This topic shows 6 replies instead of 5:
http://literaryforums.org/forums/1000-me...t-200.html

Many topics seems to show +1 replies (total post count) instead of (total post count - 1)
I just realised I asked for a URL and there was one in the post above. Clearly I wasn't awake.

Hmm... run this query:

SELECT COUNT(*) FROM `mybb_posts` WHERE `tid` = '1441';

It should return 1 if everything was normal but it may return 2 here.
Thanks. Will do.
I'm getting 1 as the result
Hmm, OK, can you upload this script to your forum root and run it?? Just a quick recounting script. Please make sure you've backed up your threads table before running just in case I've made a mistake in it.
[attachment=17428]
I'll try it locally first. Thanks for the help. Smile

Update: all replies shows as -1 now. You won't find it on my forum as I did this on localhost.
o.O

It was fine on my localhost... goes through each thread, counts the number of posts in that thread from the posts table, then takes 1 off that as one of those posts was the original post, and then updates the thread replies value with that new number... did you use the same database on your localhsot as your live site??
Pages: 1 2