Skip to:
Content

BuddyPress.org

Opened 5 months ago

Closed 4 months ago

#9101 closed enhancement (fixed)

Add BP custom PHP constants to the BP Site Health debug info panel

Reported by: espellcaste's profile espellcaste Owned by: espellcaste's profile espellcaste
Milestone: 14.0.0 Priority: normal
Severity: normal Version:
Component: Core Keywords: has-patch 2nd-opinion
Cc:

Description

As titled.

Change History (18)

#1 @espellcaste
5 months ago

Related to #9093

#2 @imath
5 months ago

Excellent idea @espellcaste I totally agree it’s a must have πŸ’ͺ

This ticket was mentioned in ​PR #232 on ​buddypress/buddypress by ​renatonascalves.


5 months ago
#3

  • Keywords has-patch added

Trac ticket: ​https://buddypress.trac.wordpress.org/ticket/9101

Had no idea we had so many constants. The list was compiled and confirmed via the ​https://github.com/buddypress/bp-documentation/discussions/133

https://github.com/buddypress/buddypress/assets/19148962/d6dcdd08-0c37-4e1d-beab-56fcb7cbc288

​renatonascalves commented on ​PR #232:


5 months ago
#4

@imath Just to be clear, deprecated constants should be removed even if they are being used?

If yes, I think this good. But I do wonder about possible issues caused by those contants, and since this page can help with debugging, a deprecated constant being used that could be causing an issue would be missing from the list, which would make debugging even harder and the page less helpful.

What do you think?

​imath commented on ​PR #232:


5 months ago
#5

@renatonascalves Good point! I agree knowing if a user is using a deprecated constant is an interesting info.

My fear is more that viewing these deprecated constants without explicit mentions about them being deprecated might give ideas to users like "I can use this constant to do that". So I'd do a defined() check before adding a deprecated constant to the list + make sure to include a (deprecated) keyword into concerned labels.

​renatonascalves commented on ​PR #232:


5 months ago
#6

@imath Agree! My suggestion was exactly to add a deprecated label on it, maybe pointing to the new documentation page where more details could be available on what it does and why it is deprecated. :)

​renatonascalves commented on ​PR #232:


5 months ago
#7

The link part could be added later. I'll proceed with the label only .

​renatonascalves commented on ​PR #232:


5 months ago
#8

@imath Could you take another pass after the suggested changes were applied?

​renatonascalves commented on ​PR #232:


5 months ago
#9

@imath Changes applied! :)

#10 @espellcaste
5 months ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 13731:

Improve the BP Site Health debug info panel with BP related PHP constants

fixes #9101
closes ​https://github.com/buddypress/buddypress/pull/232

This ticket was mentioned in ​PR #245 on ​buddypress/buddypress by ​imath.


5 months ago
#11

Use only one site-health-info panel to list BP Settings & Constants

https://github.com/buddypress/buddypress/assets/1834524/19205208-60f3-432f-9161-76cb53089de4

Trac ticket: ​https://buddypress.trac.wordpress.org/ticket/9101

#12 @imath
5 months ago

  • Keywords 2nd-opinion added
  • Resolution fixed deleted
  • Status changed from closed to reopened

Maybe I'm overthinking it, but I believe there should only be one panel for BuddyPress into the Site Health Info screen. Alternatively, the "BuddyPress" panel could be renamed "BuddyPress Settings".

I personally prefer one panel.

#13 @espellcaste
5 months ago

@imath Just to add more context, I tried to follow the WordPress organization, where they have a panel for the constants and another for the settings. But the way it is in the screenhot, also work. :)

#14 @imath
5 months ago

@espellcaste I figured it out. Thanks for adding this context. I think your approach is consistent, the main reason I believe we should use only one panel is potential remarks we could get like "How come you use 2 panels while other plugins use only one, etc.."

This ticket was mentioned in ​Slack in #buddypress by imath. ​View the logs.


4 months ago

​@emaralive commented on ​PR #245:


4 months ago
#16

OK, I took a look and if one were to do a copy and paste into a text file the results for 2 panels makes more sense and aesthetically more pleasing (clear distinction as to the identification of BP constants). See the below between Single Panel vs Double Panel:

### Single Panel

### buddypress ###

version: 14.0.0-alpha
active_components: Extended Profiles, Settings, Friend Connections, Private Messages, Activity Streams, Notifications, User Groups, Site Directory, Members, Members Invitations
url_parser: BP Rewrites API
global_community_visibility: anyone
template_pack: BuddyPress Nouveau 14.0.0-alpha
! hide-loggedout-adminbar: Yes
! bp-disable-account-deletion: Yes
! bp-disable-avatar-uploads: Yes
! bp-disable-cover-image-uploads: Yes
bp-enable-members-invitations: Yes
bp-enable-membership-requests: No
! bp-disable-profile-sync: Yes
! bp_restrict_group_creation: Yes
! bp-disable-group-avatar-uploads: Yes
! bp-disable-group-cover-image-uploads: Yes
! bp-disable-blogforum-comments: Yes
_bp_enable_heartbeat_refresh: Yes
BP_VERSION: 14.0.0-alpha
BP_DB_VERSION: 13422
BP_REQUIRED_PHP_VERSION: 5.6.0
BP_PLUGIN_DIR: /path/to/buddypress/plugin/directory/
BP_PLUGIN_URL: site.url/wp-content/plugins/buddypress/
BP_IGNORE_DEPRECATED: undefined
BP_LOAD_DEPRECATED: undefined
BP_ROOT_BLOG: 1
BP_ENABLE_MULTIBLOG: undefined
BP_ENABLE_ROOT_PROFILES: undefined
BP_DEFAULT_COMPONENT: undefined
BP_XPROFILE_BASE_GROUP_NAME: mystery
BP_XPROFILE_FULLNAME_FIELD_NAME: Display Name
BP_MESSAGES_AUTOCOMPLETE_ALL: Disabled
BP_DISABLE_AUTO_GROUP_JOIN: undefined
BP_GROUPS_DEFAULT_EXTENSION: undefined
BP_SIGNUPS_SKIP_USER_CREATION: undefined
BP_MEMBERS_REQUIRED_PASSWORD_STRENGTH: undefined
BP_EMBED_DISABLE_PRIVATE_MESSAGES: undefined
BP_EMBED_DISABLE_ACTIVITY_REPLIES: undefined
BP_ENABLE_USERNAME_COMPATIBILITY_MODE: undefined
BP_AVATAR_DEFAULT_THUMB: undefined
BP_AVATAR_DEFAULT: undefined
BP_AVATAR_URL: site.url/wp-content/uploads
BP_AVATAR_UPLOAD_PATH: /path/to/wp-content/uploads
BP_SHOW_AVATARS: 1
BP_AVATAR_ORIGINAL_MAX_FILESIZE: 5120000
BP_AVATAR_ORIGINAL_MAX_WIDTH: 450
BP_AVATAR_FULL_HEIGHT: 150
BP_AVATAR_FULL_WIDTH: 150
BP_AVATAR_THUMB_HEIGHT: 50
BP_AVATAR_THUMB_WIDTH: 50
BP_USE_WP_ADMIN_BAR: undefined
BP_FRIENDS_DB_VERSION: undefined
BP_FORUMS_PARENT_FORUM_ID: 1
BP_MEMBERS_SLUG: undefined
BP_GROUPS_SLUG: undefined
BP_MESSAGES_SLUG: undefined
BP_NOTIFICATIONS_SLUG: undefined
BP_BLOGS_SLUG: undefined
BP_FRIENDS_SLUG: undefined
BP_ACTIVITY_SLUG: undefined
BP_SETTINGS_SLUG: undefined
BP_XPROFILE_SLUG: undefined
BP_FORUMS_SLUG: forums
BP_SEARCH_SLUG: search

### Double Panel

### buddypress ###

version: 14.0.0-alpha
active_components: Extended Profiles, Settings, Friend Connections, Private Messages, Activity Streams, Notifications, User Groups, Site Directory, Members, Members Invitations
url_parser: BP Rewrites API
global_community_visibility: anyone
template_pack: BuddyPress Nouveau 14.0.0-alpha
! hide-loggedout-adminbar: Yes
! bp-disable-account-deletion: Yes
! bp-disable-avatar-uploads: Yes
! bp-disable-cover-image-uploads: Yes
bp-enable-members-invitations: Yes
bp-enable-membership-requests: No
! bp-disable-profile-sync: Yes
! bp_restrict_group_creation: Yes
! bp-disable-group-avatar-uploads: Yes
! bp-disable-group-cover-image-uploads: Yes
! bp-disable-blogforum-comments: Yes
_bp_enable_heartbeat_refresh: Yes

### buddypress-constants ###

BP_VERSION: 14.0.0-alpha
BP_DB_VERSION: 13422
BP_REQUIRED_PHP_VERSION: 5.6.0
BP_PLUGIN_DIR: /path/to/buddypress/plugin/directory/
BP_PLUGIN_URL: site.url/wp-content/plugins/buddypress/
BP_IGNORE_DEPRECATED: undefined
BP_LOAD_DEPRECATED: undefined
BP_ROOT_BLOG: 1
BP_ENABLE_MULTIBLOG: undefined
BP_ENABLE_ROOT_PROFILES: undefined
BP_DEFAULT_COMPONENT: undefined
BP_XPROFILE_BASE_GROUP_NAME: mystery
BP_XPROFILE_FULLNAME_FIELD_NAME: Display Name
BP_MESSAGES_AUTOCOMPLETE_ALL: Disabled
BP_DISABLE_AUTO_GROUP_JOIN: undefined
BP_GROUPS_DEFAULT_EXTENSION: undefined
BP_SIGNUPS_SKIP_USER_CREATION: undefined
BP_MEMBERS_REQUIRED_PASSWORD_STRENGTH: undefined
BP_EMBED_DISABLE_PRIVATE_MESSAGES: undefined
BP_EMBED_DISABLE_ACTIVITY_REPLIES: undefined
BP_ENABLE_USERNAME_COMPATIBILITY_MODE: undefined
BP_AVATAR_DEFAULT_THUMB: undefined
BP_AVATAR_DEFAULT: undefined
BP_AVATAR_URL: site.url/wp-content/uploads
BP_AVATAR_UPLOAD_PATH: /path/to/wp-content/uploads
BP_SHOW_AVATARS: 1
BP_AVATAR_ORIGINAL_MAX_FILESIZE: 5120000
BP_AVATAR_ORIGINAL_MAX_WIDTH: 450
BP_AVATAR_FULL_HEIGHT: 150
BP_AVATAR_FULL_WIDTH: 150
BP_AVATAR_THUMB_HEIGHT: 50
BP_AVATAR_THUMB_WIDTH: 50
BP_USE_WP_ADMIN_BAR: undefined
BP_FRIENDS_DB_VERSION: undefined
BP_FORUMS_PARENT_FORUM_ID: 1
BP_MEMBERS_SLUG: undefined
BP_GROUPS_SLUG: undefined
BP_MESSAGES_SLUG: undefined
BP_NOTIFICATIONS_SLUG: undefined
BP_BLOGS_SLUG: undefined
BP_FRIENDS_SLUG: undefined
BP_ACTIVITY_SLUG: undefined
BP_SETTINGS_SLUG: undefined
BP_XPROFILE_SLUG: undefined
BP_FORUMS_SLUG: forums
BP_SEARCH_SLUG: search

​imath commented on ​PR #245:


4 months ago
#17

Thanks for your feedback @emaralive. Let's leave it the way it is then πŸ‘. We'll see with user feedbacks if I was worrying for nothing πŸ˜‰.

#18 @imath
4 months ago

  • Resolution set to fixed
  • Status changed from reopened to closed
Note: See TracTickets for help on using tickets.