Skip to:
Content

Opened 7 years ago

Closed 7 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: 0.8.2.1
Component: Front-end Keywords:
Cc:

Description

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 0.8.2.1 install with no plugins. One person claims to have tried it and been unable to reproduce the problem. See further discussion at: http://bbpress.org/forums/topic/hierachical-forums-do-not-seem-to-work

Change History (4)

comment:1 riddle7 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="http://notmyrealsite.net/bbpress/forum.php?id=4&#038;page">Community</a><small> &#8211; Kids, pets, events, activities, and more</small></td>
        <td class="num">1</td>
        <td class="num">1</td>
</tr>
<tr class="bb-precedes-sibling bb-first-child bb-child">
        <td><div class="nest"><a href="http://notmyrealsite.net/bbpress/forum.php?id=11&#038;page">Gardening and Landscaping</a><small></small></div></td>
        <td class="num">0</td>
        <td class="num">0</td>
</tr>
<tr class="bb-precedes-sibling bb-follows-sibling bb-child alt">
        <td><div class="nest"><a href="http://notmyrealsite.net/bbpress/forum.php?id=10&#038;page">Kids and Schools</a><small></small></div></td>
        <td class="num">0</td>
        <td class="num">0</td>
</tr>
<tr class="bb-last-child bb-follows-sibling bb-child">
        <td><div class="nest"><a href="http://notmyrealsite.net/bbpress/forum.php?id=12&#038;page">Parks and Recreation</a><small></small></div></td>
        <td class="num">0</td>
        <td class="num">0</td>
</tr>

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' />

comment:2 riddle7 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.

comment:3 mdawaffe7 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.

comment:4 mdawaffe7 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.