Changes between Version 1 and Version 2 of Ticket #9139
- Timestamp:
- 04/28/2024 05:21:49 PM (12 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #9139 – Description
v1 v2 7 7 * https://github.com/buddypress/buddypress/blob/9df9764d33b34bf3cf2f48368741875b43250201/src/bp-core/bp-core-functions.php#L1022-L1024 8 8 9 When this occurs, BP sets the `current_component` property to `groups`. This works fine as intended on the root site, but this check should be omitted from sub-sites altogether since this isn't expected behavior. On our install, the sub-site's front page ID matched the Group Directory's page ID from the root site and this caused `bp_is_directory_homepage()` to return `true` causing the Group Directory to display instead of the sub-site's intended front page when bp_redirect_canonical() is disabled. (If bp_redirect_canonical() is enabled (), sub-site homepages are redirected back to the root site.)9 When this occurs, BP sets the `current_component` property to `groups`. This works fine as intended on the root site, but this check should be omitted from sub-sites altogether since this isn't expected behavior. On our install, the sub-site's front page ID matched the Group Directory's page ID from the root site and this caused `bp_is_directory_homepage()` to return `true` causing the Group Directory to display instead of the sub-site's intended front page when bp_redirect_canonical() is disabled. (If bp_redirect_canonical() is enabled, sub-site homepages are redirected back to the root site.) 10 10 11 11 I would suggest returning `false` for `bp_is_directory_homepage()` when the function is being called from a sub-site and not the root site.