Skip to:
Content

BuddyPress.org

Opened 5 months ago

Closed 3 months ago

#8291 closed defect (bug) (fixed)

BuddyPress Menus - Select all menu items is not adding all available menu items

Reported by: vapvarun Owned by: slaFFik
Milestone: 7.0.0 Priority: normal
Severity: normal Version: 5.2.0
Component: Administration Keywords: early needs-refresh
Cc:

Description

BuddyPress - 5.2.0
Tested with BuddyPress 6.0.0-RC2
Active theme: 2020 theme

https://prnt.sc/sbh0bj
Clicking at Select all just reload the page.

https://www.awesomescreenshot.com/video/68020?key=e2b5caad282125d439bd4f3b00c5c77d

Attachments (2)

8291.patch (2.5 KB) - added by imath 5 months ago.
8291-2.patch (9.9 KB) - added by imath 4 months ago.

Download all attachments as: .zip

Change History (12)

#1 @imath
5 months ago

  • Component changed from Core to Administration
  • Keywords needs-patch added
  • Owner set to slaFFik

Hi @vapvarun

Thanks for your feedback. That's probably because the "Select All" link was converted to a checkbox in WordPress 5.3. See https://core.trac.wordpress.org/ticket/47048 I agree this is something we need to fix. I'm looking at it to see if we can include this in 6.0.0.

@imath
5 months ago

#2 @imath
5 months ago

  • Keywords has-patch early added; needs-patch removed
  • Milestone changed from Awaiting Review to Up Next

The attached patch should fix the issue, but it needs to make an i18n string change. Moreover, I believe logged-in & logged-out items should be in 2 different tabs, otherwise it seems to me it makes no sense to select all logged-in & logged-out items.

Let's work on it during next release.

#3 @imath
4 months ago

  • Milestone changed from Up Next to 7.0.0

#4 @vapvarun
4 months ago

@imath I think it's fine to keep a single select all as logout menus only display when someone is not logged in and others are for logged in only, in that way a dedicated user menu with all these menus will not be blank for login/log-out users by default.

#5 @imath
4 months ago

Sure, but having it organized in 2 tabs instead of 1 doesn't prevent you to add logged-in and logged-out menu items in the same menu.

@imath
4 months ago

#6 @imath
4 months ago

In 8291-2.patch I suggest to change how we've been generating the accordion menu output to avoid checking if WordPress version is >= 5.3.

It needs some more testing (especially for WordPress < 5.3) and to deprecate the BP_Walker_Nav_Menu_Checklist class and corresponding file. Here's a screenshot:

https://cldup.com/k3S-jtQslx.png

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


3 months ago

#9 @imath
3 months ago

  • Keywords needs-refresh added; has-patch removed

Awesome @vapvarun Thanks a lot for your testing I'll add the code to deprecate BP_Walker_Nav_Menu_Checklist and we'll be able to have this fixed soon.

#10 @imath
3 months ago

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

In 12678:

Administration: improve how BP Member Nav Menu items are managed

Since WordPress 5.3, the WP nav menu meta boxes had their output modified to improve a11y. The most visible improvement was to use a checkbox to select all box's current panel menu items instead of a link. This change also modified the JavaScript causing the BP Member nav menu meta box to fail at selecting all menu items.

As we support WordPress versions that are older than 5.3, we had to review the way we were extending the Accordion Menu box so that we can enjoy WP 5.3 improvements and keeps on being back compatible with previous versions of WordPress.

As this new way does not need the BP_Walker_Nav_Menu_Checklist class anymore, we are deprecating the class's corresponding file without removing the class from our Classes Autoloader in case some plugin developers are using it directly.

Once we will be sure no plugin developers are using it directly, we will need to delete the class's file and remove the class from our Classes Autoloader.

Props vapvarun

Fixes #8291

Note: See TracTickets for help on using tickets.