BuddyDev

Search

[Resolved] [x] icon to delete subscriptions

  • Participant
    Level: Initiated
    Posts: 18
    Mike Witt on #46580

    In a user’s profile, in Forums -> Subscriptions, there’s a little icon that looks like [x]. It *appears* to be something you would use to unsubscribe from that forum. But (at least on my site) it doesn’t do anything.

    I would post a picture of it, but I don’t know now 🙂

    Does anyone know if this [x] is supposed to do anything?

    Thanks!

    Mike

  • Keymaster
    (BuddyDev Team)
    Posts: 24623
    Brajesh Singh on #46584

    Hi Mike,
    Thank you for the question.
    It is a known Bug in bbPress extension for BuddyPress(comes with bbPress plugin).

    Please add this to your bp-custom.php

    
    // Fix BbPress 2.6 bug not allowing handling of subscription actions from profile.
    add_action( 'bp_actions', function () {
    
    	if ( empty( $_GET['action'] ) || ! is_string( $_GET['action'] ) || ! function_exists( 'bbp_subscriptions_handler' ) ) {
    		return;
    	}
    
    	// Sanitize the GET action
    	$action = sanitize_key( $_GET['action'] );
    
    	// Bail if action was totally invalid
    	if ( empty( $action ) ) {
    		return;
    	}
    
    	bbp_subscriptions_handler( $action );
    }, 1 );
    
    

    Let me know if that works for you or not. i haven’t tested this fix in recent version.

    Regards
    Brajesh

  • Participant
    Level: Initiated
    Posts: 18
    Mike Witt on #46585

    Thanks Brajesh. I wasn’t sure if it was BP or bbP. Do you know if there’s a bbP track bug for it? I’ll also ask on the bbP forum. I’ll let you know if I manage to try the fix.

    Mike

  • Keymaster
    (BuddyDev Team)
    Posts: 24623
    Brajesh Singh on #46597

    Hi Mike,
    You are welcome.

    It seems someone had reported it earlier on bbPress trac and our topic was linked there too today.

    https://bbpress.trac.wordpress.org/ticket/3454

    Regards
    Brajesh

  • Participant
    Level: Initiated
    Posts: 18
    Mike Witt on #46622

    The code appears to work on my test site. I updated the bbP ticket:
    https://bbpress.trac.wordpress.org/ticket/3454#comment:2

  • Keymaster
    (BuddyDev Team)
    Posts: 24623
    Brajesh Singh on #46633

    Thank you Mike.

    The fix in bbPress core will be much simpler than the above code.

    Regards
    Brajesh

You must be logged in to reply to this topic.

This topic is: resolved