Fixed ProfilePosts::actionComments loads all profile-posts to find the total

Affected version


Well-known member
In actionComments, all profile posts on a user are loaded when the code is just interested in the total

$profilePosts = $profilePostFinder->where('post_date', '>', $profilePost->post_date)->fetch();

$page = floor($profilePosts->count() / $this->options()->messagesPerPage) + 1;
Shouldn't this just be ->total() to get the profile post count total?

XF Bug Bot

XenForo bug fixer bot
Staff member
Thank you for reporting this issue. It has now been resolved and we are aiming to include it in a future XF release (2.1.2).

Change log:
In a couple of places, use a count/total query when calculating the correct page number for profile posts.
Any changes made as a result of this issue being resolved may not be rolled out here until later.