Skip to:
Content

BuddyPress.org

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#6033 closed defect (bug) (fixed)

Group home filters do not work when the activity component is disabled

Reported by: vimes1984 Owned by: r-a-y
Milestone: 2.2 Priority: normal
Severity: normal Version: 1.7
Component: Groups Keywords: has-patch commit
Cc:

Description (last modified by r-a-y)

When the activity component is deactivated and you click on a group home page, the default loaded template part is now the group members template loop:
https://buddypress.trac.wordpress.org/browser/tags/2.1.1/src/bp-templates/bp-legacy/buddypress/groups/single/home.php#L36

If you attempt to use the dropdown filters or the ajax search functions to filter the group members, they do not work.

The JS needs some tweaking to fix this.

Attachments (4)

buddypress.js (54.1 KB) - added by vimes1984 5 years ago.
patched bp-legacy buddypress.js
6033.diff (3.9 KB) - added by tharsheblows 5 years ago.
diff of buddypress.js previously uploaded
6033.1.diff (1.2 KB) - added by tharsheblows 5 years ago.
6033.02.patch (1008 bytes) - added by r-a-y 5 years ago.

Download all attachments as: .zip

Change History (20)

@vimes1984
5 years ago

patched bp-legacy buddypress.js

#1 @DJPaul
5 years ago

  • Keywords needs-patch added; has-patch removed

Thanks for reporting the issue, vimes1984.

Can someone else run a diff of this file against trac? Then we can test/review, and move to an appropriate milestone.

#2 @vimes1984
5 years ago

The .min would need to be rebuilt as well..

#3 @tharsheblows
5 years ago

Here is the diff. I've only done that -- haven't looked at it yet!

@tharsheblows
5 years ago

diff of buddypress.js previously uploaded

#4 @vimes1984
5 years ago

weird I only changed the first lines...

#5 @tharsheblows
5 years ago

The 3 places where you've added in this?
'home' === object && 'groups' === ...

@tharsheblows
5 years ago

#6 @vimes1984
5 years ago

that's the one :D

#7 @tharsheblows
5 years ago

Yay!

I can't reproduce this though. I'm creating a new group and the search and filters work. Then, even if I delete the activity about creating the group, they still work.

Can you tell me a little more about it -- ideally the exact steps to take to reproduce the issue.

#8 @vimes1984
5 years ago

I created a new group and had a list of members in it due to having no activity it defaulted onto the members loop page tempalte on the home page... and the filters nor search worked....

#9 @vimes1984
5 years ago

Christ that reads awfully...
Ok I created a group with no activity, it then defaults to the members loop on the home page of the group.
Like this neigther the search nor the filters work...
Changed themes to default removed all plugins and nada...
Using Buddypress Version 2.1.1
and Wordpress Version 4.0

#10 @r-a-y
5 years ago

  • Description modified (diff)
  • Keywords has-patch added; needs-patch removed
  • Milestone changed from Awaiting Review to 2.2
  • Owner set to r-a-y
  • Status changed from new to assigned
  • Summary changed from Groups Home templates no activity ajx not working.. to Group home filters do not work when the activity component is disabled
  • Version changed from 2.0.3 to 1.7

I've duplicated the issue when I deactivate the activity component from "Settings > BuddyPress > Components" admin page in the WP admin dashboard.

I think the fix proposed by vimes1984 works, but needs to be tweaked to check that what is loaded on the page is the group members template part.

Assigning to myself for a closer look.

#11 @DJPaul
5 years ago

  • Keywords needs-patch added; has-patch removed

@r-a-y
5 years ago

#12 @r-a-y
5 years ago

  • Keywords has-patch added; needs-patch removed

02.patch sets the object and scope when the group members template is in use.

This is better than checking explicitly for the home object as in 01.diff.

This ticket was mentioned in Slack in #buddypress by r-a-y. View the logs.


5 years ago

#14 @johnjamesjacoby
5 years ago

  • Keywords commit added

Nice work, Ray. This looks like a fine approach.

#15 @r-a-y
5 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 9305:

bp-legacy: Add better detection for the group member search field.

Previously, if the activity component is disabled and a user is on a group
homepage, the AJAX search and select dropdown would not function properly.

This commit fixes this by setting the appropriate object and scope
parameters when the group member search field is detected.

Props vimes1984 for an initial patch.

Fixes #6033.

#16 @vimes1984
5 years ago

Yeah I get props :D

Note: See TracTickets for help on using tickets.