diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index 46092060f..5f128ac07 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -1,6 +1,7 @@ 7.10.27 - fixed #12379: userImport documentation error - fixed #12382: WebGUI::Crud does not work with all form types + - fixed: Threads with no posts return the wrong lastReply data. 7.10.26 - fixed: Template diagnostics when called without a session asset. diff --git a/lib/WebGUI/Asset/Post/Thread.pm b/lib/WebGUI/Asset/Post/Thread.pm index 7878b5e72..ecf14bd7f 100644 --- a/lib/WebGUI/Asset/Post/Thread.pm +++ b/lib/WebGUI/Asset/Post/Thread.pm @@ -450,7 +450,7 @@ sub getLastPost { my $lastPostId = $self->get("lastPostId"); my $lastPost; if ($lastPostId) { - $lastPost = WebGUI::Asset::Post->new($self->session, $lastPostId); + $lastPost = WebGUI::Asset->newByDynamicClass($self->session, $lastPostId); } return $lastPost if (defined $lastPost); return $self;