Skip to:
Content

BuddyPress.org

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#7903 closed defect (bug) (fixed)

Nouveau - Don't use AJAX to refresh directories when filtered by type

Reported by: r-a-y's profile r-a-y Owned by: djpaul's profile djpaul
Milestone: 3.2.0 Priority: normal
Severity: normal Version: 3.0.0
Component: Templates Keywords: has-patch
Cc:

Description

When navigating to the Members Directory filtered by type (example.com/members/type/ninja), clicking on the "All Members" tab would not show all members. Same thing happens with the Groups Directory.

This is an older problem we had with bp-legacy - #7291. To fix this, we need to apply a version of r11198 to Nouveau's JS so AJAX isn't used when clicking on a directory tab.

Attachments (3)

7903.01.patch (539 bytes) - added by r-a-y 6 years ago.
7903.02.patch (2.8 KB) - added by imath 6 years ago.
7903.03.patch (1.6 KB) - added by imath 6 years ago.

Download all attachments as: .zip

Change History (10)

@r-a-y
6 years ago

#1 @r-a-y
6 years ago

  • Keywords has-patch added; needs-patch removed

@imath - Could I get you to take a look at this patch to see if it is okay? Thanks!

@imath
6 years ago

#2 @imath
6 years ago

Hi @r-a-y

Thanks for pinging me about it. 7903.01.patch is fine, I've tested it and it works as expected. So you can use it, no problem.

But as a few lines above in buddypress-nouveau.js, there's already a 'no-ajax' available class to escape from AJAX, I would recommend to use it. I think it will make more sense for developers to understand why the page is reloaded in this case.

Moreover, I doubt the body class checks would work for Groups type, as so far this 'type' class is only added when a member type is set.

That's why I think 7903.02.patch:

  • would make more sense for the 'no-ajax' thing,
  • would take the group type in account
  • could possibly take in account more components having a directory types (eg: blogs)

#3 @DJPaul
6 years ago

For changes in any files in either of the template packs, please change the @version tag in the file header to the release the change will be in (e.g. 4.0.0 in this case).

---

It is unclear to me what exactly a "component's type directory" means, so while that needs to be rephrased into something more under stable, the rest of the patch looks good (I have not tested).

Last edited 6 years ago by DJPaul (previous) (diff)

#4 @imath
6 years ago

Hi @DJPaul,

Sorry for the late reply. You're right let's avoid this confusion. I think we don't need to introduce a new function to check if the page is a directory displaying members with a specific member type (or groups with a specific group type).

So I suggest 7903.03.patch to fix the issue.

@imath
6 years ago

#5 @djpaul
6 years ago

  • Owner set to djpaul
  • Resolution set to fixed
  • Status changed from new to closed

In 12224:

Nouveau: fix filtering Member Directory when specified by user type.

This is a problem we had with BP-Legacy's JS, and as it seems this part was
copied into Nouveau, we are implementing the same fix here. This involves not
using Javascript filtering for the Member Directory filters when a user type
is set.

A better fix would be to rewrite the Javascript to solve the underlying issue.

Fixes #7903

Props imath

#6 @djpaul
6 years ago

In 12225:

Nouveau: fix filtering Member Directory when specified by user type.

This is a problem we had with BP-Legacy's JS, and as it seems this part was
copied into Nouveau, we are implementing the same fix here. This involves not
using Javascript filtering for the Member Directory filters when a user type
is set.

A better fix would be to rewrite the Javascript to solve the underlying issue.

Fixes #7903 (3.0.x branch)

Props imath

#7 @DJPaul
6 years ago

Sorry @r-a-y - forgot to prop you here. My bad. ❤️

Note: See TracTickets for help on using tickets.