Skip to:
Content

bbPress.org

Opened 6 weeks ago

Closed 6 weeks ago

#3698 closed defect (bug) (fixed)

Nested reply ancestors include an invalid zero ID

Reported by: johnjamesjacoby Owned by: johnjamesjacoby
Priority: normal Milestone: 2.6.20
Component: Component - Replies Version: 2.6.0
Severity: normal Keywords:
Cc:

Description

Create a topic with replies A, B, and C. Set B to reply to A, then C to reply to B. bbp_get_reply_ancestors( C ) returns [ B, A, 0 ]; the expected result is [ B, A ]. The root reply has no reply-to ID, but its post_parent is the topic, so the current loop appends zero before stopping.

Stop when the next reply-to ID is empty, preserving the existing loop detection and filter. Add a PHPUnit regression for root, one-level, and two-level reply chains.

This is present in the canonical 2.6.0 tag and branches/2.6. Fix in trunk and backport to branches/2.6 for 2.6.20. The wider reply test coverage is tracked in #3695.

Change History (2)

#1 @johnjamesjacoby
6 weeks ago

In 7807:

Replies: Correct ancestry and position comparisons.

Stop threaded reply ancestry at the root instead of appending a zero ID, and compare normalized integer positions so unchanged replies do not trigger redundant writes. Add regression coverage for both cases.

In trunk, for 2.7.

See #3698.
See #3699.
See #3695.

#2 @johnjamesjacoby
6 weeks ago

  • Owner set to johnjamesjacoby
  • Resolution → fixed
  • Status new → closed

In 7808:

Replies: Backport ancestry and position fixes.

Stop reply ancestry before appending an invalid zero ID, and avoid position updates when the stored menu order is unchanged. Add focused PHPUnit regressions for both behaviors.

In branches/2.6, for 2.6.20.

Fixes #3698.
Fixes #3699.

Note: See TracTickets for help on using tickets.