MyBB Community Forums

Full Version: Topics in subforums-subforums don't show on forum index.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey everyone,

Forgive me if this has already been reported (my guess is that it already has, since I'm betting someone has most likely found this before me). Anyway, if this is something that has been discussed, please link me to a thread about it - so that I can find out how to fix this bug. Thank you in advance.

Here's the problem:
Go here, and scroll down to "GTA: San Andreas". It reads: "Threads: 0, Posts: 0, Last Post: Never".
Yet if you look at it in the category view (outside of the forum index) it shows: "Threads: 1, Posts: 2, Last Post: Unexplained Mysteries ... by Stein".
Finally, as additional proof; here is the subforum view (which there is no problem with). And the forum itself.

So it appears (to me) that MyBB is having a problem pulling topic info onto the index page when it is in subforums inside of subforums inside of categories (or at least at that level.)

If anyone could provide me with assistance, it would be very appreciated.
Thank you, Smile
Andy
try this:
create a new php document and save it in you mybb directory, then put the following in the file:
<?php
// FIX FORUM COUNTS

require "./global.php";

$query = $db->query("SELECT fid FROM ".TABLE_PREFIX."forums");
while($row = $db->fetch_array($query))
{
    updateforumcount($row['fid']);
}
?>
Open your web broswer and type the address of the file that you just create. This should work, I got this code form somebody else form this forum.
Just furthering this issue a little bit more, have you shuffled around the forums in the Admin CP by any chance? Such as moved a forum from one parent to another.
@Christian: thank you. Smile
@Chris: yes, I did happen to move a few forums into different parent forums maybe two or three times. Why do you ask?

Thanks,
Andy
AndyM3 Wrote:@Chris: yes, I did happen to move a few forums into different parent forums maybe two or three times. Why do you ask?

Thanks,
Andy

It could be a side effect of the "parentlist not being updated when forum is edited" bug.

You can try to upload this file to the MyBB root and run it from your browser (if the resulting page is blank, it should be ok), and then post a message on the subforum's subforum, then see if it gets updated.
Thank you Dennis, that solved the whole problem!