Opened 9 years ago
Closed 9 years ago
#3044 closed defect (bug) (duplicate)
"menu_order" breaks for topics with more than 1,000 replies
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Priority: | normal | |
| Severity: | normal | Version: | |
| Component: | Component - Replies | Keywords: | dev-feedback |
| Cc: | info@… |
Description
While inserting a new reply in bbp_new_reply_handler() the 'menu_order' is defined by:
'menu_order' => bbp_get_topic_reply_count( $topic_id, false ) + 1
With $integer = false this will trigger bbp_number_format() and will return a formatted number. With more than 1,000 replies you'll get something like "1,012" which results as 'menu_order' = 2 in my database.
This leads to defect freshness links, since bbp_get_reply_position() will return wrong values.
Handling the menu_order as an integer solved this issue for me:
'menu_order' => bbp_get_topic_reply_count( $topic_id, true) + 1
Change History (1)
Note: See
TracTickets for help on using
tickets.
Hey @wpdennis! Thanks for noticing this. Looks like we've already fixed this for 2.6 in #2556 and #2615.
If you're able, give the 2.6 beta try!
https://bbpress.org/forums/topic/bbpress-2-6-beta/