Lukas W.
Well-known member
- Affected version
- 2.2.4
Running into this issue quite a lot. Looks like the controller is throwing that if the last post of a thread happens to be the only unread post as well as being ignored:
Probably either need to return the post even if it's ignored, or remove the first_unread result from the response.
PHP:
if ($thread->isUnread())
{
/** @var \XF\Entity\Post $firstUnread */
$firstUnread = $this->getPostRepo()
->findNextPostsInThread($thread, $thread->getVisitorReadDate())
->skipIgnored()
->with('api')
->fetchOne();
$result['first_unread'] = $firstUnread->toApiResult();
}
Probably either need to return the post even if it's ignored, or remove the first_unread result from the response.