#9259 closed defect (bug) (fixed)
page_on_front dropdown on secondary sites includes items from root site
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 14.5.0 | Priority: | normal |
| Severity: | normal | Version: | 14.1.0 |
| Component: | Administration | Keywords: | |
| Cc: |
Description
Setup:
- Multisite
- BP 14.1.0, activated networkwide
- BP Classic 1.4.0, activated networkwide
When visiting Dashboard > Settings > Reading on a secondary site (ie not the root blog), the page_on_front dropdown includes the bp_pages items from the root blog.
Related: #9052
Seems like we should simply be bailing out of the function (or not hooking the callback to 'get_pages' at all) when ! bp_is_root_blog(), but happy to hear other ideas.
Attachments (1)
Change History (7)
#1
@
3 months ago
- Component changed from Core to Blogs
- Milestone changed from Awaiting Review to 15.0.0
#3
@
3 months ago
- Component changed from Blogs to Administration
- Milestone changed from 15.0.0 to 14.5.0
- Version set to 14.1.0
Moving this to 14.5 since it is a small fix. I was able to confirm it too. Good catch.
#4
@
3 months ago
One minor correction in my testing. This issue would never happen with "BP Classic 1.4.0, activated networkwide". Since bp_core_get_query_parser returns rewrites. So my guess is @boonebgorges that this plugin is inactive for you? That's a typo, right?!
Attaching a patch that implements the suggested fix - bailing out of
bp_core_include_directory_on_front()when not on the root blog.The Change:
// BP pages are only relevant on the root blog in multisite. if ( ! bp_is_root_blog() ) { return $pages; }This check is added right after the existing query parser check, so on secondary sites in multisite, the function returns early and doesn't add BP directory pages to the
page_on_frontdropdown.Testing (subdirectory multisite):
Verified in browser - BP pages from the root site no longer appear in the Settings > Reading > Homepage dropdown on secondary sites.