[buddypress-trac] [BuddyPress Trac] #4062: Activity makes profile avtivity filtered aswel

buddypress-trac noreply at wordpress.org
Fri Oct 14 15:15:15 UTC 2016

#4062: Activity makes profile avtivity filtered aswel
 Reporter:  gogger                  |       Owner:
     Type:  defect (bug)            |      Status:  new
 Priority:  normal                  |   Milestone:  Future Release
Component:  Activity                |     Version:  1.2
 Severity:  minor                   |  Resolution:
 Keywords:  has-patch dev-feedback  |
Changes (by lakrisgubben):

 * keywords:   => has-patch dev-feedback


 As far as I can tell the dropdown always have the correct filter selected
 as long as the filter that's selected (via the cookie bp-activity-filter)
 also has a context that exists in the current scope, i.e. if the bp-
 activity-filter cookie has a value of new_member and you're viewing a
 profile, "everything" is shown in the dropdown because the context of
 new_member is != member and therefore it's not shown in the dropdown
 generated by bp_activity_show_filters() (see:
 activity-template.php#L3830). The problem is that the activity is still
 filtered by new_member in
 legacy/buddypress-functions.php#L689 even though no activities of that
 type exists in the context of viewing a profile page. I've whipped up a
 quick patch as a proof of concept for how this could be fixed, not sure
 though if it's attacking the problem in the right place. This patch might
 need some cleanup, for example it might be better to abstract out the
 $context setting functionality into its own function
 bp_get_activity_context( $context ) or something since it's just
 copypasted from https://buddypress.trac.wordpress.org/browser/trunk/src
 /bp-activity/bp-activity-template.php#L3803 But other than that, as far as
 I can tell this solves the problem by not filtering activities if the
 $context of the filter is not a part of the current scope.

Ticket URL: <https://buddypress.trac.wordpress.org/ticket/4062#comment:4>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac

More information about the buddypress-trac mailing list