Skip to:
Content

BuddyPress.org

Opened 4 years ago

Closed 4 years ago

Last modified 3 years ago

#6872 closed defect (bug) (fixed)

List table views can't be filtered

Reported by: thebrandonallen Owned by: imath
Milestone: 2.5 Priority: normal
Severity: normal Version: 2.0
Component: Core Keywords: has-patch
Cc:

Description

This ticket technically addresses two separate issues. However, since one exposes the other, I'm wrapping them both into one.

The first issue is that the signups list table doesn't set the screen parameter in the constructor. This means them when you're on the Pending (signups) view, any custom views added via the view_(users\users-network) filter will disappear.

The second issue, is that the Pending view is added in the get_views() method, on top of being added via filter. As long as you're on any view other than the Pending view, the filter kicks in. When on the Pending view, any other custom views added earlier than the Pending view will get bumped behind the pending view.

The attached patch fixes both issues. The get_views() method can actually be removed, but I didn't want to make that decision, so the patch just calls parent::get_views().

Attachments (5)

all_view.png (16.7 KB) - added by thebrandonallen 4 years ago.
Views displayed as expected
pending_view.png (17.1 KB) - added by thebrandonallen 4 years ago.
Blocked view moved behind pending view
6872.01.patch (2.1 KB) - added by thebrandonallen 4 years ago.
6872.02.patch (2.4 KB) - added by imath 4 years ago.
patch refreshed to r10532
6872.03.patch (3.9 KB) - added by imath 4 years ago.

Download all attachments as: .zip

Change History (14)

@thebrandonallen
4 years ago

Views displayed as expected

@thebrandonallen
4 years ago

Blocked view moved behind pending view

#1 @imath
4 years ago

Thanks a lot, will check your patch asap but it looks very promising :)

#2 @imath
4 years ago

  • Keywords commit added
  • Milestone changed from Awaiting Review to 2.5

Just tested on multisite and on non multisite, works great and i agree it's something we should do!

Thanks a lot @thebrandonallen

@imath
4 years ago

patch refreshed to r10532

#3 @imath
4 years ago

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

In 10547:

Make sure Users List Table views can still be filtered after the Pending one has been added.

Props thebrandonallen

Fixes #6872

#4 @imath
4 years ago

  • Keywords needs-patch added; has-patch has-screenshots commit removed
  • Resolution fixed deleted
  • Status changed from closed to reopened

This commit has 2 side effects we need to fix:

  • As the screen id is now set to the users one, then any plugin adding columns to the users list will also add their column to the signups list.
  • It's no more possible to hide columns within the screen options tab.

@thebrandonallen If we don't find a solution, i suggest to revert the commit.

#5 @imath
4 years ago

  • Keywords has-patch reporter-feedback added; needs-patch removed

.03.patch should fix the issue and let plugins safely add their views before or after our "Pending" one.

@thebrandonallen can you confirm ?

@imath
4 years ago

#6 @thebrandonallen
4 years ago

  • Keywords reporter-feedback removed

I can confirm .03.patch works. It's a shame it took that much code get it working. Thanks!

#7 @imath
4 years ago

Thanks a lot for your feedback :)

I will run some extra tests on Multisite and commit soon :)

#8 @imath
4 years ago

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

In 10579:

Signups Administration: improve the screen management

r10547 introduced some regressions by setting the screen ID to users or users-network :

  • It was not possible anymore to manage the displayed column inside the Screen options.
  • All costum columns added to the Users List Table using the filter manage_users_columns or manage_users-network_columns were also added to the Signups List Table.

To fix these and also make sure it is still possible to add custom views before and after the pending view, we are now using the Signups screen ID and introducing a new function to temporarly set the screen ID to users or users-network when needed.

Fixes #6872

#9 @DJPaul
3 years ago

  • Component changed from General - UX/UI to Core
Note: See TracTickets for help on using tickets.