MyBB Community Forums

Full Version: Latest post not showing up in thread view + cause + (tentative) solution
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

Sorry if you find my english too poor to understand me.

We had bit annoying bug on our forums (1.8.11), where some new, random posts weren't showing up, when user(s) tried to view them. Oddly enough, those buggy posts could be seen in forum/category view (i.e. forum index), newest posts menu or any third party plugin like DVZ Stream. But they weren't showing up in thread view - if user tired to read it. 

This bug seemed bit random: just some new posts weren't showing up, just some users experienced it, and after a while (could be few minutes or few hours) those bugged posts were fixed spontaneously. We also noticed that moderators and admins weren't experiencing this bug. 

Users found some temporary fix for it. Buggy posts can be seen if user changes number of posts shown per topic page. 

So afer bit of digging in showthread.php, friend of mine found cause and some solution for it. It seems that mybb have problem with counting how many posts should be shown per page, if "it" has to take into account temporary deleted posts. Bug concerns normal users "only". Moderators or admins won't get it, which can make noticing this bug bit tricky.

Anyway, proposed quick-fix for anyone experiencing bug is editing 928 line of showthread.php code:
if($ismod || true) 
looks like suggested fix can be useful for many users. Thank You.
Hi, this issue has been confirmed and already pushed to GitHub (including a definitive solution). Check out https://community.mybb.com/thread-210189.html and https://github.com/mybb/mybb/pull/2816.