Skip to:

Opened 10 years ago

Closed 10 years ago

#674 closed defect (fixed)

New topic posted to top-level forum appears in subforum

Reported by: riddle Owned by: mdawaffe
Milestone: 0.8.3 Priority: high
Severity: major Version:
Component: Front-end Keywords:


When I post a new topic directly in a top-level forum, it does not appear there, but rather in the last of its subforums.

That is, if I have forum A with subforums A1 and A2, forum B with subforums B1 and B2, and forum C, and I try to post a new topic to top-level forum B, it will actually get posted to subforum B2.

I experienced this in a brand-new install with no plugins. One person claims to have tried it and been unable to reproduce the problem. See further discussion at:

Change History (4)

#1 @riddle
10 years ago

By the way, I can confirm the problem at the HTML level. In my site under construction, I have a top-level forum with ID 4 and three subforums with IDs 10, 11 and 12. Here's an excerpt from the forum list:

<tr class="bb-parent bb-follows-niece bb-root alt">
        <td><a href=";page">Community</a><small> &#8211; Kids, pets, events, activities, and more</small></td>
        <td class="num">1</td>
        <td class="num">1</td>
<tr class="bb-precedes-sibling bb-first-child bb-child">
        <td><div class="nest"><a href=";page">Gardening and Landscaping</a><small></small></div></td>
        <td class="num">0</td>
        <td class="num">0</td>
<tr class="bb-precedes-sibling bb-follows-sibling bb-child alt">
        <td><div class="nest"><a href=";page">Kids and Schools</a><small></small></div></td>
        <td class="num">0</td>
        <td class="num">0</td>
<tr class="bb-last-child bb-follows-sibling bb-child">
        <td><div class="nest"><a href=";page">Parks and Recreation</a><small></small></div></td>
        <td class="num">0</td>
        <td class="num">0</td>

But if I click through to the top-level forum (ID 4) and examine the source for the New Topic form, the hidden variable "forum_id" which appears to govern where it will be posted is set to 12, not to 4:

<input type="hidden" name="_wp_http_referer" value="/bbpress/forum.php?id=4&#038;page" />
<input type='hidden' name='forum_id' value='12' />

#2 @riddle
10 years ago

One more clue: this may have some interaction with Kakumei. At least, if I edit bb-templates/kakumei/forum.php and comment out the code which generates the list of Subforums, the hidden value of "forum_id" in the resulting page is correct (in my example it is 4, not 12). So I'm guessing that Kakumei is scribbling over a $forum_id variable that it shouldn't mess with, although I can't find a smoking gun in the code.

I'm such a bbPress newb, though, that I don't know whether Kakumei falls outside the purview of this Trac installation and I should be complaining to someone else. If that's the right course of action, please let me know.

#3 @mdawaffe
10 years ago

  • Milestone set to 0.8.3 & XML-RPC
  • Owner set to mdawaffe
  • Status changed from new to assigned

Confirmed. It's the forums loop functions.

#4 @mdawaffe
10 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [877]) how about preserve() and reinstate() to protect globals? Got a better name? Fixes #674

Note: See TracTickets for help on using tickets.