diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index fede7d2f5..cb9da8ed5 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -28,6 +28,7 @@ arbitrarily. - fix: Event Related Links are now proper collateral in their own table instead of a silly HTML area + - fix: rating archived posts causes error 7.4.21 - fix: Mails sent from WebGUI now wrap at 78 characters, as the SMTP diff --git a/lib/WebGUI/Asset/Post/Thread.pm b/lib/WebGUI/Asset/Post/Thread.pm index 07e903fa4..3fe020199 100644 --- a/lib/WebGUI/Asset/Post/Thread.pm +++ b/lib/WebGUI/Asset/Post/Thread.pm @@ -818,8 +818,9 @@ sub updateThreadRating { my $calcRating = 0; my $postIds = $self->getLineage(["descendants","self"], { - includeOnlyClasses => ["WebGUI::Asset::Post","WebGUI::Asset::Post::Thread"], - }); + includeOnlyClasses => ["WebGUI::Asset::Post","WebGUI::Asset::Post::Thread"], + includeArchived => 1, + }); $calcRating += $session->db->quickScalar( "SELECT SUM(rating) FROM Post_rating WHERE assetId IN (".$session->db->quoteAndJoin($postIds).")"