I’ve posted the bug report to bbPress here: https://bbpress.trac.wordpress.org/ticket/3430
Syelle, if you have access to your server, you can add the following snippet to wp-content/mu-plugins/
or wherever else you might store custom code as a temporary workaround:
// Allow pending group topics to be viewed.
add_action( 'bbp_before_group_forum_display', function() {
if ( 'topic' !== bp_action_variable() ) {
return;
}
add_filter( 'bbp_before_has_topics_parse_args', function( $retval ) {
if ( 0 !== strpos( $retval['name'], 'pending-' ) ) {
return $retval;
}
// Sanity check! Ensure that we have a post ID.
$id = substr( $retval['name'], 8 );
if ( ! is_numeric( $id ) ) {
return $retval;
}
// Sanity check 2: Ensure post is pending and user can edit post.
$topic = get_post( $id );
if ( 'pending' !== get_post_status( $topic ) && ! current_user_can( 'edit_posts' ) ) {
return $retval;
}
unset( $retval['name'] );
$retval['p'] = $topic->ID;
return $retval;
} );
} );
// Fix pending (and spam) group topic permalinks.
add_filter( 'bbp_get_topic_permalink', function( $retval, $topic_id ) {
$topic = get_post( $topic_id );
if ( 'topic' !== $topic->post_type ) {
return $retval;
}
if ( 'pending' !== get_post_status( $topic ) && 'spam' !== get_post_status( $topic ) ) {
return $retval;
}
if ( ! bp_is_group() ) {
return $retval;
}
// Add 'pending-{$topic_id}' as slug for pending topics.
if ( 'pending' === get_post_status( $topic ) ) {
$retval .= sprintf( 'pending-%d', $topic_id );
}
return bbp_add_view_all( trailingslashit( $retval ), true );
}, 20, 2 );
// Fix redirect when posting a new pending group topic.
add_filter( 'bbp_new_topic_redirect_to', function( $retval, $redirect, $topic_id ) {
if ( ! bp_is_group() ) {
return $retval;
}
$topic = bbp_get_topic( $topic_id );
$slug = trailingslashit( $topic->post_name );
$topic_hash = '#post-' . $topic_id;
// Pending status
if ( bbp_get_pending_status_id() === get_post_status( $topic_id ) ) {
$slug = bbp_add_view_all( sprintf( 'pending-%d', $topic_id ), true );
}
return trailingslashit( bp_get_group_permalink( groups_get_current_group() ) ) . 'forum/topic/' . $slug . $topic_hash;
}, 20, 3 );