Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply link on user profiles not working, javascript error


  • kodacollider
    Participant

    @kodacollider

    I’m getting a javascript error when trying to hit the ‘reply’ link from user profile activity feeds. The reply link works fine on other pages (such as after following the ‘View Conversation’ link), but on a user profile only this link is returning a javascript error:

    Uncaught TypeError: Cannot read property ‘slice’ of undefined
    at String.<anonymous> (jquery-scroll-to.min.js?ver=2.8.2:1)
    at Function.each (jquery.js?ver=1.12.4:2)
    at HTMLBodyElement.<anonymous> (jquery-scroll-to.min.js?ver=2.8.2:1)
    at Function.each (jquery.js?ver=1.12.4:2)
    at a.fn.init.each (jquery.js?ver=1.12.4:2)
    at a.fn.init.a.fn.scrollTo (jquery-scroll-to.min.js?ver=2.8.2:1)
    at Function.a.scrollTo (jquery-scroll-to.min.js?ver=2.8.2:1)
    at HTMLDivElement.<anonymous> (buddypress.min.js?ver=2.8.2:1)
    at HTMLDivElement.dispatch (jquery.js?ver=1.12.4:3)
    at HTMLDivElement.r.handle (jquery.js?ver=1.12.4:3)

    So I imagine it’s some sort of conflict with another plugin or my theme. I just need to figure out how to resolve it. It’s a bit odd that it works everywhere else on the site except for from a user profile page.

    Thanks for any help in advance.

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

  • kodacollider
    Participant

    @kodacollider

    I just noticed — this may or may not be the cause of the problem — the activity feed on my profile seems to be generating duplicate comment IDs.

    When showing several conversations, there are multiple instances of, for example li#acomment-31… one in one conversation, and then another li#acomment-31 in the next convo down. This clearly shouldn’t be happening but it seems too blatant to have not been caught/fixed by now? What could be causing this?

    Thanks again in advance.


    kodacollider
    Participant

    @kodacollider

    I had to disable activity update comments from displaying as their own items entirely to fix this, but it looks like doing so did. I used the code from this thread.

    function my_bp_activities_include_activity_types( $retval ) {
    // only allow the following activity types to be shown
        $retval['action'] = array(
         //   'activity_update',
            'activity_comment',
            'new_blog_post',
            'new_blog_comment',
            'friendship_created',
            'created_group',
        );
     
        return $retval;
    }
    add_filter( 'bp_after_has_activities_parse_args', 'my_bp_activities_include_activity_types' );

    Weird issue all around.

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