Skip to:
Content
Pages
Categories
Search
Top
Bottom

What could stop post comments from displaying?


  • Venutius
    Participant

    @venutius

    I’ve got two identical sites in terms of the themes and plugins loaded. I’ve not modified the Activity-loop file on either yet.

    On my test site post comments are displayed in the activity stream, with the filter set to everything.

    However on my main site post comments are not displaying with the filter set to everything.

    If I set the filter to “Comments”, the post comments display.

    Any suggestions as to where I could look? Is there a setting somewhere I may have inadvertently clicked?

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

  • Venutius
    Participant

    @venutius

    Found the problem, it was down to post comments made via bbPress Topics for posts, this is a plugin that is no longer supported, so I’m unlikley to get a fix


    Venutius
    Participant

    @venutius

    Nope that wasn’t the problem after all, turns out that post was just using standard comments and not the bbPress forums. back to the drawing board.


    Henry Wright
    Moderator

    @henrywright

    If you go to Settings > BuddyPress and then select the Settings tab at the top, you should see Blog & Forum Comments under the Activity Settings section on that page. Ensure that checkbox is checked.


    Venutius
    Participant

    @venutius

    Thanks for the suggestion

    Yep that is set.

    The strange thing is, If I filter it to show only comments, the comments show up.


    Venutius
    Participant

    @venutius

    OK, I’ve managed to replicate the problem on my test site. It seems to be related to comments on older posts.

    I’m running 2015 and Buddypress, that’s all.

    Comments on older posts are not showing in the activity feed when it is set to Everything, they can only be seen if comments only are selected in the filter.

    Comments on recent posts are shown under the update for that post.


    Venutius
    Participant

    @venutius

    I think this is a behaviour issue rather than a bug. I assumed that all comments would be displayed in the activity feed one the date that they are submitted. However it seems that activity for posts means that all comments are anchored under the original post which will appear in the activity feed on the date that it was posted.

    So in otherwords, for a comment made yesterday to a blog submitted three days ago, you would need to scroll back through three days worth of activity updates in order to see the comment.

    Filtering for comments only breaks this link to the original post and they are therefore seen as separate items, in the date order that they arrived, removed from the context of the original post.

    Is there anyway I can change this behaviour? I want all comments to be displayed in the activity feed in the date order that they arrived, I’d be happy if they were separated from the original post since the comment itself holds the context link to the original post.

    Is there some editing I can do to activity-loop or similar to achieve this?


    Venutius
    Participant

    @venutius

    I’m looking at the activity-loop document in the codex, I’m wondering if display_comments stream is what I’m looking for.

    Trouble is, from that document I have no idea where to place that argument or how to structure it. Ideally there would be an example of usage below every argument type.


    Venutius
    Participant

    @venutius

    Yay! I guessed my way to success, I added the following to activity-loop.php:

    ‘*/
    do_action( ‘bp_before_activity_loop’ ); ?>

    <?php if ( bp_has_activities( bp_ajax_querystring( ‘activity’ ).’&object=groups,profile,status,friends,blogs’ ).’&action=display_comments=stream’ ) : ?>’


    Venutius
    Participant

    @venutius

    Actually no, that did not work, I was looking in the wrong view. Did I use that code right?


    Henry Wright
    Moderator

    @henrywright

    Looking at the Activity Loop article, there’s 3 steps to this:

    1. Pass display_comments to your loop:

    if ( bp_has_activities( bp_ajax_querystring( 'activity' ) . '&display_comments=stream' ) ) :

    2. Wrap your HTML in an activity class (This is an optional step if you want AJAX to work).

    3. Add the code (see article) inside your loop, below activity-content and above the closing list item tag.


    Venutius
    Participant

    @venutius

    Finally cracked it with the following:

    <?php if ( bp_has_activities( bp_ajax_querystring( ‘activity’ ).’&display_comments=stream’ ) ) : ?>


    Venutius
    Participant

    @venutius

    Thanks Henry

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘What could stop post comments from displaying?’ is closed to new replies.
Skip to toolbar