Skip Navigation

Resolved by author

Reported for: BuddyPress Multilingual 1.7.0

Resolved in: BuddyBoss Platform 2.5.70

Topic Tags: Compatibility

Overview of the issue

When using the BuddyBoss theme, within the User profile > Forums page, “My Discussions” and “My Replies” sections are not displaying content for translated forum topics in the secondary language. This means if a user has commented on a translated forum topic, their interactions aren’t visible when viewing the profile in the translated version.

Workaround

Please, make sure of having a full backup of your site before proceeding.

  • Add the following snippet to the theme’s functions.php file:
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    // WPML Workaround for compsupp-6425
    function wpml_compsupp6425_fix_query_in_user_profile( $r ) {
        if ( class_exists('Sitepress') && isset( $r['post_parent'] ) && $r['post_parent'] === 'any' ) {
            $r['post_parent'] = '';
        }
        return $r;
    }
     
    add_filter( 'bbp_after_has_topics_parse_args', 'wpml_compsupp6425_fix_query_in_user_profile' );
    add_filter( 'bbp_after_has_replies_parse_args', 'wpml_compsupp6425_fix_query_in_user_profile' );