Skip to:
Content
Pages
Categories
Search
Top
Bottom

Posting a status in 2.0 with limited activity scope causes the page to show all


  • xyhavoc
    Participant

    @xyhavoc

    Hello,

    I just upgraded to BP 2.0. In my activity-loop.php I added a limited scope to only show status updates. However when I post a new activity, when the page adds the new status to the activities it shows everything else that should be hidden by the scope (new friendships, new likes, etc. that I don’t want). Basically the scope &action=activity_update isn’t consistent when posting new statuses. Anything I can do about this?

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

  • xyhavoc
    Participant

    @xyhavoc

    Does anybody know what’s up with this? BP 1.9 was not like this. It would be nice to have that consistency with the activity scope.


    Mathieu Viet
    Moderator

    @imath

    How did you force the status to be ‘&action=activity_update’ ?

    Because if you’ve edited a template that is within the /plugins/buddypress folder, then upgrading the plugin removed the things you eventually edited..


    xyhavoc
    Participant

    @xyhavoc

    @imath

    No that template file has been edited. I’ll give you an example of what I mean:

    -activity-loop.php I have added the filter “&action=activity_update” so that the stream only shows user’s activity posts, as per the codex (https://codex.buddypress.org/developer/loops-reference/the-activity-stream-loop/).

    -I Pull up the activity feed on the web site, everything looks A-OK, the filters are working as they should.

    -Then I post a new activity update, when Buddypress adds the new activity via javascript, the filter is removed and the user can now scroll and see activities not listed in the activity-loop.php filter.

    Basically the filter isn’t working consistently. I’ve never had this problem with BP 1.8 or 1.9.

    I’m also having other problems where deleting an activity, the activity slides up to disappear, and then it comes back again. Upon refresh the activity is now gone.


    xyhavoc
    Participant

    @xyhavoc

    I really want to keep these performance boosts with BP 2.0, but with these new problems setting me back I may just have to revert to 1.8.

    hi @xyhavoc

    Personally, i don’t really like this method “hardcoding the type into the template“. I’ve made a gist using another method, tested it and it’s restricting the activity type the way you want even in case of a new activity post.

    By default, this will restrict for all activity loops.
    But See the commented parts if you want this behavior to only happen in user’s profile, or in group’s home or in directory..).

    I don’t know if you use the bp-custom.php file, if not, i recommend you to do so, so that this will happen whatever the activated theme is.

    Here’s the link to the gist:
    https://gist.github.com/imath/5c7e4db74513ca4b30b8


    xyhavoc
    Participant

    @xyhavoc

    @imath

    Thank you for all your help. I’ve added the code to bp-custom.php but nothing has changed. Posting a new activity still resets the filter and shows everything. I think I may just have to revert to an older BP version. This 2.0 update has really set me back on my site.

    Edit: Looks like I’m stuck with this new broken version. I can’t find anywhere to download 1.9. *Sigh*


    xyhavoc
    Participant

    @xyhavoc

    Can you guys open a ticket about this issue or something? I mean, what’s the point of having an entire activity loop filtering system along with codex documentation if it doesn’t even work the way it’s supposed to now.


    shanebp
    Moderator

    @shanebp


    xyhavoc
    Participant

    @xyhavoc

    @shanebp Thank you, I will create a ticket now.

    @xyhavoc

    Just a quick follow up to inform you, i’ve read your discussion with @boonebgorges on 5603.
    I’ve attached an alternative patch to the ticket, it would be great if you could test it.

    Thanks again for your feedback.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Posting a status in 2.0 with limited activity scope causes the page to show all’ is closed to new replies.
Skip to toolbar