Hello, I use your plugin and I really like it. Today I tried to update the buddypress to 2.2.0 I have problems. Lost the title on the page users and groups (screenshots). Before that, it was all OK 2.1.1 stood. I went back to 2.1.1 buddypress and again everything was fine. It seems to me a conflict arises between the plug-ins. Please tell me how to fix this problem? Thank you for your response in advance, best regards and greetings.
screenshots




Any updates about this issue? Is it possible to get it fixed and included into upcoming release?
Is this still relevant with current versions of the plugins?
If so what are the quick steps to reproduce from scratch?
Yes, it's still relevant. You can check on cosydale.com also
To reproduce install the latest WP, BP and WordPress SEO. Activate all the BP components, go to your profile on front-end, observe the page title.
Going to update on this in the latest Yoast release there is no longer a way to solve the issue. In previous versions, you could disable the force rewrite titles which would solve the BuddyPress title issue. However, since that option appears to be removed from the settings menu there is no way to go about solving the issue.
@Rarst Will you be able to check this issue?
I don't really have BuddyPress on hand, but will keep this tab and see if I can quickly poke it tomorrow.
Activate all the BP components, go to your profile on front-end, observe the page title.
Ok, I have _no_ idea what this means. Step by step, please? :)
/wp-admin/options-general.php?page=bp-components and tick all checkboxes/wp-admin/admin.php?page=bp-page-settings and make sure that all Directories are connected with appropriate WordPress pages. If not - create WP pages and associate and save.slaFFik)./members/slaffik/profile/Ctrl+U or visually on a tab in your browser of choice).| Русский BuddyPress (consider defining on step 1 your site name as Русский BuddyPress to have the same result).Are you using Twenty Fifteen by chance? Or another theme with that newer title implementation? I get <title>• Test Stack</title> in it, _but_ <title>Профиль | Rarst | Test Stack</title> if I switch to any earlier core theme.
Ok, I think the issue is that with "new" title SEO hooks into pre_get_document_title (instead of "old" wp_title), but BuddyPress doesn't and execution never reaches it.
Related #3579 on how we approach this and if this needs adjustment.
Any updates about this?
Frankly handling titles are sensitive bit, that I hadn't worked much with and afraid to touch. WP introducing new branches of logic for it didn't help, so personally I don't have clarity on how to proceed with this. Hence — needs decision.
We recently received a feedback. Fortunately, there is a solution on the BuddyPress forum related to this and one of the user confirmed us it worked: https://buddypress.org/support/topic/bussdypress-title-and-seo-yoast-problem/#post-253267
function wpseo_fix_title_buddypress($title) {
// Check if we are in a buddypress page
if (function_exists( 'buddypress') && buddypress()->displayed_user->id || buddypress()->current_component ) {
$bp_title_parts = bp_modify_document_title_parts();
// let's rebuild the title here
$title = $bp_title_parts['title'] . ' ' . $title;
}
return $title;
}
add_filter( 'wpseo_title', 'wpseo_fix_title_buddypress');
Please inform the customer of conversation # 123516 when this conversation has been closed.
This solution has issues, it's not production-ready.
@mazedulislamkhan Please check comments in that thread.
I have a temporary workaround I am using in one of my themes.
if ( ! function_exists( 'myarcadetheme_remove_bp_wpseo_title' ) && function_exists( 'wpseo_auto_load' ) ) {
function myarcadetheme_remove_bp_wpseo_title() {
if ( ! bp_is_blog_page() ) {
$myarcadetheme_front_end = WPSEO_Frontend::get_instance();
remove_filter( 'pre_get_document_title', array( $myarcadetheme_front_end, 'title' ), 15 );
}
}
add_action( 'init', 'myarcadetheme_remove_bp_wpseo_title' );
}
Might be a sloppy fix but it doesn't appear to generate any problems.
Seems the code by @Volnus works. Tested on my site with Hueman theme for both users and groups.
Code works when it is put in functions.php of a theme. When in bp-custom.php - doesn't work.
@Volnus Thanks for your workaround. Works like a charm!
Please inform the customer of conversation # 171086 when this conversation has been closed.
@Pcosta88
I suspect this issue won't be ever closed as fixed :)
Please inform the customer of conversation # 193584 when this conversation has been closed.
@SergeyBiryukov As agreed during WCEU - here is the ticket that I was talking about.
Closed in favor of #7332
@atimmer
How #7332 (about bbPress) relates to #1971 (about BuddyPress)?
Because this was labeled with bbs I assumed it had to do with bbPress. Then closed in favor of #7331.
I don't get why to create a duplicated #7331 years after the current was created, which has discussions and some fixes. Cleaning up github issues should prevent new issues duplicating the old ones, no?
Also the new one lacks all the discussions and you lose everyone who are subscribed to this issue updates.
And bbs label can be removed as it's not relevant at all, as clearly written on the 1st line of this ticket description.
@slaFFik There were multiple issues that documented a small part of incompatibility with BuddyPress or bbPress. We decided we need to really investigate Yoast SEO + BuddyPress and Yoast SEO + bbPress by one of our SEOs. That is the purpose of the newly created issue.
@atimmer But why then close all these tickets? They are relevant, can be reproduced, not ignored, not fixed. It's totally ok to create a ticket for investigation - but this is a separate task.
But I understand that you won't rollback anything. Sorry for offtopic conversation regarding issues management.
@slaFFik No problem.
The reason for closing the issues is to keep GitHub manageable. A closed issue does not disappear from history. You can still find it in Google and refer to it. Closing it means that the issue tracker is more in line with reality.
I'm using this great code provided by Brajesh Singh at https://buddydev.com/buddypress/making-wordpress-seo-plugin-compatible-with-buddypress-part-2/
But I wonder if there is a complete solution out there or perhaps an update (bp/yoast) that solves this issue
Most helpful comment
I have a temporary workaround I am using in one of my themes.
if ( ! function_exists( 'myarcadetheme_remove_bp_wpseo_title' ) && function_exists( 'wpseo_auto_load' ) ) { function myarcadetheme_remove_bp_wpseo_title() { if ( ! bp_is_blog_page() ) { $myarcadetheme_front_end = WPSEO_Frontend::get_instance(); remove_filter( 'pre_get_document_title', array( $myarcadetheme_front_end, 'title' ), 15 ); } } add_action( 'init', 'myarcadetheme_remove_bp_wpseo_title' ); }Might be a sloppy fix but it doesn't appear to generate any problems.