Skip to:
Content

BuddyPress.org

Opened 7 months ago

Closed 3 weeks ago

#9293 closed defect (bug) (fixed)

check if taxonomy exists before adding the menu

Reported by: shawfactor's profile shawfactor Owned by: espellcaste's profile espellcaste
Milestone: 14.5.0 Priority: normal
Severity: normal Version:
Component: Groups Keywords:
Cc:

Description

I have filtered bp_get_default_taxonomies and bp_group_type no longer is a registerd taxonomy

I think it would be prudent to check if the taxonomy actauuly exists before adding a menu for it in bp_groups_admin_types_menu

Attachments (1)

9293.patch (686 bytes) - added by vapvarun 3 weeks ago.

Download all attachments as: .zip

Change History (6)

#1 @shawfactor
7 months ago

  • Summary changed from check if taxonom exists before adding the menu to check if taxonomy exists before adding the menu

#2 @espellcaste
3 weeks ago

  • Component changed from Core to Groups
  • Milestone changed from Awaiting Review to 14.5.0

I was able to confirm this issue. Thanks for the bug report. :)

#3 @vapvarun
3 weeks ago

Attached patch adds a taxonomy_exists('bp_group_type') check at the start of bp_groups_admin_types_menu().

When bp_group_type is filtered out via bp_get_default_taxonomies, the function now bails early instead of adding a broken menu link.

Tested locally - verified the menu is correctly skipped when taxonomy doesn't exist.

Thanks @shawfactor for the report!

@vapvarun
3 weeks ago

#4 @espellcaste
3 weeks ago

In 14176:

Check if the Group Types taxonomy exists before adding its menu.

Before adding a menu item for the Group Types taxonomy, confirm the taxonomy exists (if it was not disabled).

Props shawfactor and vapvarun.

See #9293 (14.0)

#5 @espellcaste
3 weeks ago

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

In 14177:

Check if the Group Types taxonomy exists before adding its menu.

Before adding a menu item for the Group Types taxonomy, confirm the taxonomy exists (if it was not disabled).

Props shawfactor and vapvarun.

Fixes #9293 (trunk)

Note: See TracTickets for help on using tickets.