Opened 5 months ago
Last modified 4 months ago
#9297 new defect (bug)
"Profile Visibility" settings link causes 404 when Extended Profiles is disabled
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Awaiting Review | Priority: | normal |
| Severity: | normal | Version: | |
| Component: | Core | Keywords: | has-patch needs-testing |
| Cc: |
Description
After disabling the Extended Profiles component (via wp-admin → Settings → BuddyPress → Components), the "Profile Visibility" link still appears under the user settings navigation (e.g., /members/username/settings/profile/).
Since Extended Profiles is disabled, clicking this link results in a 404 error.
Expected behavior:
The "Profile Visibility" tab should be automatically removed when the Extended Profiles (xprofile) component is not active, as it depends on that module to function.
Current workaround:
I’m using the following code to manually remove the nav item:
add_action( 'bp_actions', function() {
bp_core_remove_subnav_item( 'settings', 'profile', 'members' );
}, 99 );
It would be great if BuddyPress could automatically hide this settings tab when the associated component is disabled, to avoid broken links and improve UX.
Trac ticket: https://buddypress.trac.wordpress.org/ticket/9297