Skip to:
Content
Pages
Categories
Search
Top
Bottom

Error when delete activity stream comment on post


  • buddywhatshisname
    Participant

    @vhmarkgmailcom

    Since version 2.0.0, when users delete a comment on a new post in the Activity page, they get the error “There was a problem when deleting. Please try again.”, but the comment is actually deleted and is gone when you refresh the page.

    I’ve tracked the issue down to
    \wp-content\plugins\buddypress\bp-blogs\bp-blogs-activity.php::bp_blogs_sync_delete_from_activity_comment()
    which appears to return false whether it deletes the comment or not.

Viewing 6 replies - 1 through 6 (of 6 total)

  • buddywhatshisname
    Participant

    @vhmarkgmailcom

    Here’s a backtrace:

    
    [22-Sep-2015 02:59:19 UTC] bp_blogs_sync_delete_from_activity_comment::Started with $activity_id=14062
    [22-Sep-2015 02:59:19 UTC] bp_blogs_sync_delete_from_activity_comment::Done - about to return false
    [22-Sep-2015 02:59:19 UTC] bp_blogs_sync_delete_from_activity_comment::backtrace=Array
    (
        [0] => Array
            (
                [function] => bp_blogs_sync_delete_from_activity_comment
                [args] => Array
                    (
                        [0] => 1
                        [1] => 14043
                        [2] => 14062
                    )
    
            )
    
        [1] => Array
            (
                [file] => /wp-includes/plugin.php
                [line] => 213
                [function] => call_user_func_array
                [args] => Array
                    (
                        [0] => bp_blogs_sync_delete_from_activity_comment
                        [1] => Array
                            (
                                [0] => 1
                                [1] => 14043
                                [2] => 14062
                            )
    
                    )
    
            )
    
        [2] => Array
            (
                [file] => /wp-content/plugins/buddypress/bp-activity/bp-activity-functions.php
                [line] => 2468
                [function] => apply_filters
                [args] => Array
                    (
                        [0] => bp_activity_delete_comment_pre
                        [1] => 1
                        [2] => 14043
                        [3] => 14062
                    )
    
            )
    
        [3] => Array
            (
                [file] => /wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress-functions.php
                [line] => 1115
                [function] => bp_activity_delete_comment
                [args] => Array
                    (
                        [0] => 14043
                        [1] => 14062
                    )
    
            )
    
        [4] => Array
            (
                [function] => bp_legacy_theme_delete_activity_comment
                [args] => Array
                    (
                        [0] => 
                    )
    
            )
    
        [5] => Array
            (
                [file] => /wp-includes/plugin.php
                [line] => 508
                [function] => call_user_func_array
                [args] => Array
                    (
                        [0] => bp_legacy_theme_delete_activity_comment
                        [1] => Array
                            (
                                [0] => 
                            )
    
                    )
    
            )
    
        [6] => Array
            (
                [file] => /wp-admin/admin-ajax.php
                [line] => 91
                [function] => do_action
                [args] => Array
                    (
                        [0] => wp_ajax_delete_activity_comment
                    )
    
            )
    
    )
    
    [22-Sep-2015 02:59:19 UTC] bp_activity_delete_comment::Quit after apply_filters
    

    buddywhatshisname
    Participant

    @vhmarkgmailcom

    Hello? Anyone there?


    buddywhatshisname
    Participant

    @vhmarkgmailcom

    This is still an issue.


    r-a-y
    Keymaster

    @r-a-y

    Hi,

    Sorry that no one has responded to your post.

    If there are issues with the codebase (as is the case in this instance), you should post a report on our bug tracker, Trac:
    https://buddypress.trac.wordpress.org/newticket

    You should be able to login with the same credentials you use here on wordpress.org.

    Can you go into further detail about how you are deleting the comment? Are you deleting an activity comment that is connected to a post?

    Under “Settings > BuddyPress > Options”, is “Allow activity stream commenting on blog and forum posts” checked or unchecked?

    —-

    For my test:
    1. “Allow activity stream commenting on blog and forum posts” is checked.
    2. I posted a comment on a WP blog post.
    3. I navigate to the BP activity directory page and find the post in the activity stream. The WP comment that I made is listed as an activity comment under the post in the activity stream and not listed as a separate activity stream item.
    4. I click on the “Delete” button for my activity comment entry.
    5. I do not see the “There was a problem…” error.

    I haven’t tested when “Allow activity stream commenting on blog and forum posts” is unchecked yet.


    buddywhatshisname
    Participant

    @vhmarkgmailcom

    Thanks for the reply r-a-y, and good to know about the issue tracker. I posted incorrectly today — I’ve tested the problem has resolved itself — yay for you guys!

    Here’s my steps, for the record:

    
    Post a BuddyPress comment in the activity stream page /community/activity/ into My Profile
    You should see your new entry on the activity page like this:
    Blah Your Name posted an update right now
    Test post for deletion
    
    Comment [0]   Favorite   Delete
    On that same page, click that Delete button immediately below your post (url=/community/activity/delete/2001/?_wpnonce=blah) to delete that comment.
    

    r-a-y
    Keymaster

    @r-a-y

    Cool! Glad this is fixed!

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.
Skip to toolbar