Opened 11 years ago
Closed 11 years ago
#2556 closed defect (bug) (fixed)
Topics with 1000+ replies do not show page numbers
Reported by: | tharsheblows | Owned by: | johnjamesjacoby |
---|---|---|---|
Milestone: | 2.6 | Priority: | high |
Severity: | major | Version: | 2.0 |
Component: | Component - Replies | Keywords: | |
Cc: |
Description
This is a follow-up to #1974.
I'm writing this while I still remember - apologies for scatterbrainedness. This is on the latest version of bbPress, 2.5.3, unless you've released an update after the 3rd March.
I had the exact same problem as in #1974. The issue was that it was inserting 2 for menu_order in wp_posts after 1000 replies. In includes/common/functions.php I've done the same thing as here - http://bbpress.org/forums/topic/topics-with-more-than-1000-replies-not-showing-page-numbers/ changing this:
function bbp_number_format( $number = 0, $decimals = false, $dec_point = '.', $thousands_sep = ',' )
to this:
function bbp_number_format( $number = 0, $decimals = false, $dec_point = '.', $thousands_sep = '' )
So that worked but didn't update the older menu_order entries in wp_posts of course, so the older permalinks are still broken due to the incorrect menu_order. I just haven't gotten to that but think I'll do something with a little plugin using bbp_update_reply_position(). That might not work - it just hasn't been an urgent issue (ie no one's noticed the incorrect permalinks yet).
Anyway, I fixed the front end formatting by doing this sort of thing (this is in the loop-single-topic template):
<?php $topic_reply_count = bbp_get_topic_reply_count(); $topic_post_count = bbp_get_topic_post_count(); ?> <li class="bbp-topic-reply-count"><p class="entry-meta"><?php echo bbp_show_lead_topic() ? number_format( $topic_reply_count ) : number_format( $topic_post_count ); ?></p></li>
which of course would be better to do in, eg, the bbp_topic_reply function but I didn't want to edit the core plugin files more.
Attachments (1)
Change History (4)
#1
@
11 years ago
It comes under "tools" in the admin section and just uses the topic id (which by this point I knew by heart) - I would have added it to the list in includes/admin/tools.php but again I didn't want to overwrite the core.
this is what I used to recalculate the menu order so the permalinks wrote correctly