Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve BP debug info #228

Closed
wants to merge 3 commits into from
Closed

Conversation

imath
Copy link
Member

@imath imath commented Feb 12, 2024

Use JavaScript to make sure the BP help tab link is only added when the BuddyPress help tab is active.

bp-debug-info

Trac ticket: https://buddypress.trac.wordpress.org/ticket/9093


This Pull Request is for code review only. Please keep all other discussion in the BuddyPress Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the WordPress Core Handbook for more details.

Copy link
Member

@renatonascalves renatonascalves left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🌵

@@ -756,8 +756,14 @@ function bp_core_admin_notice_repopulate_blogs_resume() {
*/
function bp_core_admin_debug_information( $debug_info = array() ) {
global $wp_settings_fields;
$active_components = array_intersect_key( bp_core_get_components(), buddypress()->active_components );

if ( ! bp_is_root_blog() ) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the rationale behind this decision? If I had a network of blogs (BP instances), I'd expect to have data specific to each BP instance in each site, no?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting @renatonascalves to me there can only be 1 BP instance no matter the multisite config, as there's only 1 users table and as https://github.com/buddypress/buddypress/blob/master/src/bp-core/bp-core-options.php#L233%7CL234

The multiblog constant is simply displaying pages..There's 1 unique root blog that's why to me it's not needed to display this screen for other blogs that are relying on the unique BP instance.

That being said I may have missed a specific workaround making it possible to have multiple BP instances on a network. Can you light my ignorance about it?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, my recollection of that feature is wrong, then.

if ( ! defined( 'BP_ENABLE_MULTIBLOG' ) || ( defined( 'BP_ENABLE_MULTIBLOG' ) && (int) constant( 'BP_ENABLE_MULTIBLOG' ) === 0 ) ) {

https://codex.buddypress.org/getting-started/customizing/bp_enable_multiblog/
* Note that BP_ENABLE_MULTIBLOG is different from (but dependent on) WordPress

This here makes me think it is possible to have BP in a MU network but being the "root" of the site in the network. Meaning that each site could be its own BP instance.

* Activate at the site level to only load BuddyPress on that site.
* Activate at the network level for full integration with all sites in your network. (This is the most common multisite installation type.)
* Enable <a href="https://codex.buddypress.org/getting-started/customizing/bp_enable_multiblog/">multiblog</a> mode to allow your BuddyPress content to be displayed on any site in your WordPress Multisite network, using the same central data.
* Extend BuddyPress with a third-party multi-network plugin to allow each site or network to have an isolated and dedicated community, all from the same WordPress installation.

Could we discuss removing this feature from BP? It seems pretty old, pre-1.7 version.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree the multiblog mode is confusing. It doesn't mean you can have multiple BP instances. It means you can display the content of the same instance on multiple blogs. The readme text, you referenced is explaining it differently talking about "central data".

to allow your BuddyPress content to be displayed on any site in your WordPress Multisite network, using the same central data.

I agree we should probably rethink all the possible configs plugin's history made available. Reading the codex page you added a link to seems to explain it can be interesting when you want to use it for translation purposes.

Maybe rethinking the Administration part we've included into our roadmap can help us simplify how BuddyPress can be configured.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree! Thanks!!

src/bp-core/admin/bp-core-admin-tools.php Show resolved Hide resolved
@imath
Copy link
Member Author

imath commented Feb 16, 2024

Fixed in ebf1d00

@imath imath closed this Feb 16, 2024
@imath imath deleted the fix/debug-info branch February 16, 2024 01:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants