Resolved by author
Reported for: BuddyPress Multilingual 1.7.0
Resolved in: BuddyBoss Platform 2.5.70
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:
12345678910
// 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'
);