Gossamer Forum
Home : Products : Gossamer Forum : Discussion :

1.2.1 Reply Count Bug

Quote Reply
1.2.1 Reply Count Bug
When deleting the first reply to a post, the reply count for the root post becomes zero.

Can this be confirmed and fixed?

For instance, I have a post with two replies, delete the first reply using the "remove post" button. Now the forum list shows "Replies 0" for the parent post. If you click on the post there is still one reply.

Another example:
Post with 3 replies, delete first reply, post reply count incorrectly set to 1.

Another example:
Post with 7 replies, delete first reply, post reply count incorrectly set to 5.

The count is correct if you remove the last post

----------
Michael J. Challis - CRUZN8R - PT Cruiser Club - http://www.ptcruiserclub.org

http://www.ptcruiserclub.org/forum
Quote Reply
Re: [CRUZN8R] 1.2.1 Reply Count Bug In reply to
Sorry this should have been posted in discussion, moderator please move.

Here is a link to a post with this problem:
http://www.ptcruiserclub.org/gforum.cgi?post=163484;
This post really has 2 replies and just shows "Replies 1"

----------
Michael J. Challis - CRUZN8R - PT Cruiser Club - http://www.ptcruiserclub.org

http://www.ptcruiserclub.org/forum

Last edited by:

CRUZN8R: Feb 16, 2004, 11:45 AM
Quote Reply
Re: [CRUZN8R] 1.2.1 Reply Count Bug In reply to
I fixed it in my copy.

----------
Michael J. Challis - CRUZN8R - PT Cruiser Club - http://www.ptcruiserclub.org

http://www.ptcruiserclub.org/forum
Quote Reply
Re: [CRUZN8R] 1.2.1 Reply Count Bug In reply to
Hi,

I'm using 1.2.0 version and I get also this bug too. May I know how you fixed the bug? A lot of threads in my forum have now a wrong replies number. Unsure

Thank you very much.

François
Quote Reply
Re: [Franco] 1.2.1 Reply Count Bug In reply to
Are you sure you are running 1.2.0?

The problem and the fix I discovered was for 1.2.1 only because it is related to a new delete post feature added to 1.2.1
The fix was to comment out two lines in GForum/Post.pm in the sub called remove_one
This sub does not exist in 1.2.0

Code:

#my @ancestors = @{$pt->tree->parent_ids(id => $post->{post_id})};

#$pt->update({ post_replies => \'post_replies - 1' }, { post_id => \@ancestors });

----------
Michael J. Challis - CRUZN8R - PT Cruiser Club - http://www.ptcruiserclub.org

http://www.ptcruiserclub.org/forum
Quote Reply
Re: [CRUZN8R] 1.2.1 Reply Count Bug In reply to
Hi,

Thank you for your reply.

Yes, I'm running 1.2.0.

In GForum/Post.pm I found this:

Code:

my $fewer_replies = @new_thread_ids;
$Post->update({ post_replies => \"post_replies - $fewer_replies" }, { post_id => \@ancestors });

But I don't know how to fix it.

Jason, if you know how to fix this bug for 1.2.0, please let me know.

Thank you.

François