Opened 7 months ago
Closed 3 weeks ago
#9293 closed defect (bug) (fixed)
check if taxonomy exists before adding the menu
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| 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)
Change History (6)
#1
@
7 months ago
- Summary changed from check if taxonom exists before adding the menu to check if taxonomy exists before adding the menu
#2
@
3 weeks ago
- Component changed from Core to Groups
- Milestone changed from Awaiting Review to 14.5.0
#3
@
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!
I was able to confirm this issue. Thanks for the bug report. :)