In function advanced_forum_get_forums($tid = 0),

line # 981: $sql = db_rewrite_sql($sql);
( this rewrite doubles the count number for forum topics and forum comments)
line # 1003: $forum->num_posts = $counts[$forum->tid]->topic_count + $counts[$forum->tid]->comment_count;
( this arithmetic is wrong - it should be $forum->num_posts = $counts[$forum->tid]->comment_count; )

Comments

michelle’s picture

Status: Active » Closed (duplicate)

There's a known issue with access control modules: #755162: Forum count incorrect when using access control modules (6.x-1.1)

The second part is not wrong. Your version leaves out the nodes.

Michelle