Opened 15 years ago
Closed 15 years ago
#1249 closed defect (bug) (fixed)
Setting custom BP_SETTINGS_SLUG breaks notifications/delete settings links
Reported by: | fiskhandlarn | Owned by: | |
---|---|---|---|
Milestone: | 1.2 | Priority: | minor |
Severity: | Version: | ||
Component: | Keywords: | ||
Cc: |
Description
in bp_core_add_settings_nav(), the subnav urls are set by hardcoded "settings/" urls, rather than using the BP_SETTINGS_SLUG constant.
If one were to define BP_SETTINGS_SLUG to something else than "settings" (e.g. in bp-custom.php), bp won't find /members/xxx/settings/notifications/ for example anymore, and therefore redirect the user to the site root when clicking on notifications in the submenu.
A fix for this could be substituting this line:
$settings_link = $bp->loggedin_user->domain . 'settings/';
with either one of these:
$settings_link = $bp->loggedin_user->domain . BP_SETTINGS_SLUG . '/';
$settings_link = $bp->loggedin_user->domain . $bp->settings->slug . '/';
(In [2123]) Fixes #1249