Firefox PHP

wrong number of replies displayed

Posted by Dan Langille 
Some messages are displaying the wrong number of replies. When you go into the thread, the number of messages found does not match that number.

For example, at [] look for the topic "punk girls" which shows 2 replies. It actually has 6 replies. Then look one thread down at "side raid 100" which shows 6 replies, but has no messages.

This is version 3.2.11. Initially, I thought there might be some messages which had been hidden using the admin page. I checked; there are some hidden messages, but not related to the threads in question.

Clues please?
This is a known problem. There are steps taken in 3.3 to not allow this too happen but there is not a lot we can do that I can think of. I talk about it here:


Phorum Dev Team
You know, after reading that message I wrote, I realize it is wrong. That problem exists as well but is not the answer to this one. This problem is caused by messages being in the headers table when their threads and/or parents do not exist. You will have to join the table with itself to get those id's.

select, as id2 from table left join table as table2 on having id2 is null

I use that now for our forums at They are a very distant cousin to Phorum.

Running that query should give you a list. Maybe I will make a script to run through and clear that stuff out. It will have to work different for MySQL and PG.

Phorum Dev Team
The thread at the URL above describes my situation. Specifically, I had hidden the first message in a thread. I suspect some people replied to that message after I had hidden it.

I was about to do a quick delete on those threads, but if it's any help in debugging, I thought I'd ask you first in case you'd like to have a look. Let me know...
Re: wrong number of replies displayed
August 31, 2005 04:30PM
Amazing as it seems, I'm still using a 3.2 installation on a website I maintain, and this very problem cropped up a few days ago for the very first time. A quick search of this forum pulled up this topic, I ran the query above, found and deleted the offending message, and all's well again.

Sorry, you do not have permission to post/reply in this forum.