Skip to:
Content

BuddyPress.org

Opened 3 years ago

Closed 8 months ago

#8565 closed defect (bug) (invalid)

Pagination not working on member profile topics/replies/engagements lists

Reported by: phy9pas's profile phy9pas Owned by:
Milestone: Priority: normal
Severity: normal Version: 9.1.1
Component: Core Keywords: reporter-feedback
Cc:

Description

I’ve set up a fresh install of the latest wordpress, bbpress and buddypress:
WordPress 5.8.1
bbpress 2.6.6
BuddyPress 9.1.1

If I view my own user profile, the pagination of the topics, replies, engagements etc works as expected e.g.
/members/peter-smith/forums/engagements/page/2/

However if I view another user’s profile
e.g.
/members/peter2/forums/engagements/
When I click on page 2 of the pagination in any of these sections it take me to the wrong url:
/members/peter2/page/2/

You can see it’s missing out the “/forums/engagements/” part of the url.

I have tried flushing permalinks. This is using the deafult twentytwentyone theme with no other plugins installed.

Change History (3)

#1 @imath
3 years ago

  • Keywords reporter-feedback added

Thanks for your feedback, I believe this issue has been already reported. Could you check if #8237 is a duplicate?

My intuition is, it's a bbPress issue. But I'll give it a another look.

#2 @jgasba
15 months ago

The bug is still running and buddypress.org has it too it seems.

I added details and links to weave together some issues and comments https://bbpress.trac.wordpress.org/ticket/3355#comment:4

To anyone stumbling around here, to fix this from outside bbPress I've personaly used:

<?php
add_filter('bbp_get_replies_pagination_base', 'fix_replies_pagination_links', 10, 2);
function fix_replies_pagination_links( $base, $topic_id ) {
    if ( bp_is_user() ) {
        $base = bbp_get_user_replies_created_url( bbp_get_displayed_user_id() );
        $base = trailingslashit( $base ) . user_trailingslashit( bbp_get_paged_slug() . '/%#%/' );    
    }
  
    return $base;
}

add_filter('bbp_get_topics_pagination_base', 'fix_topics_pagination_links', 10, 2);
function fix_topics_pagination_links( $base, $topic_id ) {
    if ( bp_is_user() ) {
        $base = bbp_get_user_topics_created_url( bbp_get_displayed_user_id() );
        $base = trailingslashit( $base ) . user_trailingslashit( bbp_get_paged_slug() . '/%#%/' );    
    }
  
    return $base;
}

Not sure how that could be implemented in BuddyPress to prevent breaking. I'm having a hard time understanding if this issue is affecting all BuddyPress installs or only some specific configuration. I've tried multiple setups and plugins combos and always have this pagination links problem though 🤔

#3 @espellcaste
8 months ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed

Looks like a bbPress issue.

Note: See TracTickets for help on using tickets.