This was a 1.1.8 bug, fixed in 1.2.0. The bug created a thread which thinks it has more replies than it really does, which breaks things later on when trying to call up the thread. It comes about when deleting partial threads. To fix it up for your installation without upgrading to 1.2.0, you need to take two steps:
1) Fix the bug so that it doesn't happen again. You need to open up GForum/Table/Post.pm (not GForum/Post.pm) and look for:
$self->update({ post_replies => \'post_replies - 1' } => { post_id => \@ancestors });
The second line needs to change to become:
$self->update({ post_replies => \('post_replies - ' . @children) } => { post_id => \@ancestors });
(I've highlighted the changed section in red for you).
2) Then, to actually fix your current database, you need to run the 'repair_post_table.pl' script in the gforum/admin/tools directory.
Alternatively, you can perform a 1.2.0 upgrade. As long as your templates have been edited through the template editor in the admin panel, and you haven't directly edited GForum code (unlikely) such an upgrade should be perfectly safe, and the 1.2.0 upgrade contains code to correct the problem.
Jason Rhinelander
Gossamer Threads
jason@gossamer-threads.com
1) Fix the bug so that it doesn't happen again. You need to open up GForum/Table/Post.pm (not GForum/Post.pm) and look for:
Code:
# Update the ancestors $self->update({ post_replies => \'post_replies - 1' } => { post_id => \@ancestors });
The second line needs to change to become:
Code:
# Update the ancestors $self->update({ post_replies => \('post_replies - ' . @children) } => { post_id => \@ancestors });
(I've highlighted the changed section in red for you).
2) Then, to actually fix your current database, you need to run the 'repair_post_table.pl' script in the gforum/admin/tools directory.
Alternatively, you can perform a 1.2.0 upgrade. As long as your templates have been edited through the template editor in the admin panel, and you haven't directly edited GForum code (unlikely) such an upgrade should be perfectly safe, and the 1.2.0 upgrade contains code to correct the problem.
Jason Rhinelander
Gossamer Threads
jason@gossamer-threads.com