Skip to:
Content

BuddyPress.org

Opened 10 years ago

Closed 9 years ago

Last modified 8 years ago

#6143 closed defect (bug) (fixed)

Using activity dropdowns in member's home or group's home sets the activity scope to null

Reported by: imath's profile imath Owned by: r-a-y's profile r-a-y
Milestone: 2.4 Priority: normal
Severity: normal Version: 2.1
Component: Templates Keywords: has-patch commit
Cc:

Description (last modified by imath)

I think this is a regression. Before when you were filtering activities in member's home or group's home, the activity scope, the bp-activity-scope cookie wasn't reset from 'all' to null.

The problem is that when coming back to the activity directory, no tab are selected and in my case it was the 'my-groups' tab content that was displayed instead of all activities. I think it's really annoying, reason why i've chosen the 'major' severity.

I'll try to look in the buddypress.js file to see why this behavior has appeared.

Attachments (2)

6143.patch (745 bytes) - added by imath 10 years ago.
6143.02.patch (758 bytes) - added by r-a-y 9 years ago.

Download all attachments as: .zip

Change History (15)

#1 @imath
10 years ago

  • Description modified (diff)

#2 @imath
10 years ago

  • Priority changed from high to normal
  • Severity changed from major to normal

I'm not so sure of myself about the regression as i couldn't see what changed in this area in the latest changeset of the buddypress.js file.

But i think, the activity scope should always be set so that at least one tab of the activity directory is selected and we can easily figure out what kind of activities are displared (all / My groups / favs...).

So i suggest the 6143.patch: If null is sent to bp_activity_request, defaults to all or if the cookie is set to something else than null, use this value.

@imath
10 years ago

#3 @johnjamesjacoby
10 years ago

  • Keywords has-patch needs-testing added; needs-patch removed

Looks like there's one place in buddypress.js we purposely pass null to both scope and filter.

I'm hesitant to slip this into RC without more testing, and confirmation this is a true regression from 2.2 behavior. I can definitely recall selecting different filters from places and having the cookie feel too sticky, where I would see no results in a place there definitely were some.

Version 0, edited 10 years ago by johnjamesjacoby (next)

#4 @imath
10 years ago

  • Milestone changed from 2.2 to 2.3

I agree it needs more testing, let's move it to 2.3

#5 @DJPaul
10 years ago

I agree with John that I recall different from screens affecting the other directory screens, at least BP 1.6 if not earlier (I ran into it in an old job and had to hack some kind of fix in).

#6 @imath
10 years ago

  • Keywords needs-refresh added; needs-testing removed
  • Milestone changed from 2.3 to 2.4

Problem is still there, i should have been more active on this ticket. Sorry, i'll try to be for 2.4 :(

#7 @DJPaul
9 years ago

  • Keywords has-patch removed

This ticket was mentioned in Slack in #buddypress by imath. View the logs.


9 years ago

#9 @r-a-y
9 years ago

  • Milestone 2.4 deleted
  • Status changed from new to closed

#6614 outlines where the bug occurred (r9528) and has a better patch.

Marking this as a duplicate.

Though this ticket does bring up some good points about our usage of null in bp_activity_request(), which we should audit.

Last edited 9 years ago by r-a-y (previous) (diff)

#10 @r-a-y
9 years ago

  • Component changed from Component - Activity to Appearance
  • Keywords has-patch added; needs-refresh removed
  • Milestone set to 2.4
  • Status changed from closed to reopened
  • Version set to 2.1

Reopening as this is not related to #6614.

I spent way too much time looking into this, but the cause of the problem is when we upgraded jQuery.cookie to v1.4.1 in BuddyPress 2.1.0 (#5208), null values now get set as cookies.

Beforehand, the older version of jQuery.cookie() did not set null values as a cookie, which is how this issue came about.

02.patch is my suggestion to fix this. It checks for null values before setting our activity cookies and should resolve this issue.

@r-a-y
9 years ago

#11 @imath
9 years ago

  • Keywords commit added

@r-a-y i confirm it's fixing the issue. Thanks a lot :)

#12 @r-a-y
9 years ago

  • Owner set to r-a-y
  • Resolution set to fixed
  • Status changed from reopened to closed

In 10214:

bp-legacy: Only set activity cookies if they are not null.

When we upgraded jQuery.cookie to v1.4.1 in BuddyPress 2.1.0 (#5208),
null values now get set as cookies. Beforehand, the older version of
jQuery.cookie() did not set null values as a cookie.

This caused an issue on the Activity directory page where the correct tab
was not being selected due to the invalid cookie value.

Fixes #6143.

#13 @DJPaul
8 years ago

  • Component changed from Appearance to Templates
Note: See TracTickets for help on using tickets.