Fix 404 issue for bbPress 2.2.x
-
When I upgrade bbPress 2.1 to 2.2, all logged in users cannot connect to any forums(bbPress) but super-admins. ( 404 not found page )
I’ve searched this support forum and they say “It’s related to Role Plugins…”
But I don’t have any Role Plugins đDid a hard back trace for this error and found capabilities of bbPress dynamic roles applied after ‘bbp_template_redirect’ so bbp_forum_enforce_blocked() blocked any users not having ‘spectate’ cap – maybe all users.
Then… we should manualy apply capabilities of bbPress role to current user.
Here’s a temporary patch for this error.
(Make a plugin or put these codes to your theme’s functions.php)`
function bbp_fix_dynamic_role_cap() {
$current_user = wp_get_current_user();
$current_user->get_role_caps();
}
add_action( ‘bbp_template_redirect’, ‘bbp_fix_dynamic_role_cap’, -2 );// before bbp_forum_enforce_blocked()`
- You must be logged in to reply to this topic.