Skip to:
Content

BuddyPress.org

#9111 closed defect (bug) (fixed)

BuddyPress 12.3.0 can not click into the URLs settings screen.

Reported by: mervyntsao's profile mervyntsao Owned by: imath's profile imath
Milestone: 12.5.0 Priority: normal
Severity: normal Version: 8.0.0
Component: Core Keywords: reporter-feedback has-patch commit
Cc: emaralive

Attachments (8)

screenshot-win10-me-2024.03.29-06_01_17.png (61.9 KB) - added by emaralive 15 months ago.
screenshot-win10-me-2024.03.29-06_01_17.png
screenshot-win10-me-2024-03-27-19_06_08.png (372.0 KB) - added by emaralive 15 months ago.
screenshot-win10-me-2024-03-27-19_06_08.png
screenshot-win10-me-2024.03.27-19_27_25.png (382.9 KB) - added by emaralive 15 months ago.
screenshot-win10-me-2024.03.27-19_27_25.png
screenshot-win10-me-2024.03.27-13_42_38.png (83.8 KB) - added by emaralive 15 months ago.
screenshot-win10-me-2024.03.27-13_42_38.png
screenshot-win10-me-2024.03.29-07_09_51.png (86.8 KB) - added by emaralive 15 months ago.
screenshot-win10-me-2024.03.29-07_09_51.png
screenshot-win10-me-2024.02.25-05_17_57.png (272.7 KB) - added by emaralive 15 months ago.
screenshot-win10-me-2024.02.25-05_17_57.png
screenshot-win10-me-2024.02.25-05_35_32.png (212.6 KB) - added by emaralive 15 months ago.
screenshot-win10-me-2024.02.25-05_35_32.png
9111.patch (3.1 KB) - added by emaralive 15 months ago.

Download all attachments as: .zip

Change History (17)

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


15 months ago

@emaralive
15 months ago

screenshot-win10-me-2024.03.29-06_01_17.png

@emaralive
15 months ago

screenshot-win10-me-2024-03-27-19_06_08.png

@emaralive
15 months ago

screenshot-win10-me-2024.03.27-19_27_25.png

@emaralive
15 months ago

screenshot-win10-me-2024.03.27-13_42_38.png

@emaralive
15 months ago

screenshot-win10-me-2024.03.29-07_09_51.png

@emaralive
15 months ago

screenshot-win10-me-2024.02.25-05_17_57.png

@emaralive
15 months ago

screenshot-win10-me-2024.02.25-05_35_32.png

#2 @emaralive
15 months ago

  • Cc emaralive added
  • Keywords needs-patch reporter-feedback dev-feedback added
  • Milestone changed from Awaiting Review to 12.5.0
  • Version set to 8.0.0

Hi @mervyntsao, perhaps you could help the BuddyPress Team narrow the possible causes for your reported issue by providing additional information. As it stands, the screenshot you have provided appears to be a composite, e.g., composed of a number of images, and does not provide enough information to identify a, possible, "User Role" when this issue occurred. Any additional information that you could provide would be greatly appreciated.

In the meantime, @imath & @vapvarun, since this ticket involves "Hello BuddyPress", of which @vapvarun had mentioned during the March 27, 2024 docs-chat regarding a CSS rendering issue or the lack thereof, making it hard to read some text within the "Get Involved" tab, there is opportunity to fix the CSS issue within this ticket, as well.

So, first things first, it seems, at least to me, that "Hello BuddyPress" is intended for "Site Administrators" due to the type of information provided and links to various "BuddyPress Settings" pages/screens, e.g., bp-rewrites (URLs) & bp-credits (Credits) that require either the "manage_network_options" (Multisite - Super Admin) or "manage_options" (Single site - Administrator) capabilities. The code that provides the requisite capabilities is located on line 136 of src/bp-core/classes/class-bp-admin.php. Thus, the following "User Roles" will receive the "Sorry, you are not allowed to access this page" when trying to access any page/screen that is associated with "BuddyPress Settings" (see screenshot screenshot-win10-me-2024.03.29-06_01_17.png):

  • Subscriber
  • Contributor
  • Author
  • Editor

Furthermore, Subscriber & Contributor view the "Hello BuddyPress" modal window differently than Author & Editor (see screenshots screenshot-win10-me-2024-03-27-19_06_08.png & screenshot-win10-me-2024.03.27-19_27_25.png, respectively) and the reason the 4 (four) indicated "User Roles" are able to view the "Hello BuddyPress" modal window is because the menu item is available to them (see screenshot screenshot-win10-me-2024.03.27-13_42_38.png).

Given that there are a number of ways to provide a remedy, my thoughts are that the simplest would be to have a conditional based on the aforementioned capabilities which would dictate when the "Hello BuddyPress" menu item is displayed, i.e., display only for "Super Admin/Administrator". An example of such would be to enclose line 188 of src/bp-core/classes/class-bp-admin.php within a conditional such as:

if ( bp_current_user_can( 'bp_moderate' ) ) {
    add_action( 'admin_bar_menu', array( $this, 'admin_bar_about_link' ), 100 );
}

Not knowing how others may feel about a remedy, I'll just offer my thought as a proposal (see screenshot screenshot-win10-me-2024.03.29-07_09_51.png) and wait for feedback.

Next up is the CSS issue that @vapvarun reported during the aforementioned docs-chat (see screenshot screenshot-win10-me-2024.02.25-05_17_57.png). A remedy would be to insert the following CSS rules after line 295 of src/bp-core/admin/css/hello.css & line 295 of src/bp-core/admin/css/hello-rtl.css (see screenshot screenshot-win10-me-2024.02.25-05_35_32.png).

	.bp-hello-content p.has-white-color.has-text-color.has-background.has-medium-font-size {
		color: white;
		padding: 1.25em 2.375em !important;
	}

	.bp-hello-content p a mark.has-inline-color.has-white-color {
		color: white;
	}

	.bp-hello-content p a {
		text-decoration: none;
	}

	.bp-hello-content p a:hover {
		color: #dd823b;
		text-decoration: underline;
	}

	.bp-hello-content .wp-container-core-buttons-is-layout-1.wp-container-core-buttons-is-layout-1 {
		display: flex;
		justify-content: center;
	}

	.bp-hello-content .has-vivid-red-background-color {
		background-color: #be3631
	}

	.bp-hello-content .wp-block-button.is-style-fill a:hover {
		text-decoration: underline;
	}

	.bp-hello-content .wp-block-button__link {
		color: #fff;
		box-shadow: none;
		text-decoration: none;
		padding: calc(.667em + 2px) calc(1.333em + 2px);
		font-size: 1.125em;
	}

Again, not knowing how others may want to provide a remedy for the CSS issue, the indicated CSS rules are just a proposal and I'll wait for feedback.

#3 @imath
15 months ago

Hi @emaralive

Thanks a lot for your work on this. Both suggestions you provided are good to me.

@emaralive
15 months ago

#4 @emaralive
15 months ago

  • Keywords has-patch needs-testing added; needs-patch dev-feedback removed

Hi @imath, added/uploaded a patch (as previously provided as proposal), in case someone wanted to test. Still waiting for "reporter-feedback".

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


15 months ago
#5

Some parts of BuddyPress (like this one) are using SCSS, so we need to edit the corresponding SCSS file otherwise when running grunt commit or grunt style or grunt build the .css edits are removed.

PS: sorry @emaralive I forgot to mention it in my previous comment on the ticket. Otherwise, I've tested the patch and I confirm it behaves as expected 👍. Great job.

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

#6 @imath
15 months ago

  • Keywords commit added; needs-testing removed

Thanks a lot @emaralive for your work on it, I've added a few lines above to explain the fact I quickly built a PR with your patch. I personally think it's good to be committed. Unless @mervyntsao proves us the opposite, I'll commit the patch in a couple of days.

#7 @emaralive
15 months ago

Thanks for the assist @imath because, I'm not all that familiar with SCSS and what would have been required to build the CSS, I took a look at PR #263 and I'm still lacking knowledge and experience. The documentation does mention GruntJS:

[1] GruntJS is used by BuddyPress to run some building tasks like preparing files to be committed, generating RTL versions of CSS stylesheets or minimizing JavaScript files.

However, the local server (WSL2 [Windows Subsystem for Linux (Debian based)] I was using doesn't have Grunt installed, for a variety of reasons (I have another local server [Ubuntu based] that has Grunt installed but it doesn't have the BuddyPress repo cloned on it yet). So, this represents another opportunity to take a deeper dive into the development process.

#8 @imath
15 months ago

In 13789:

BP Hello screen: only display it to Community Site Admins

This screen targets Community Site Admins to inform them about the top features included in a new version of the plugin, its full change log as well as to explain how they can get involved into the BuddyPress open source project.

About this last point, the "Get Involved" subpage layout has also been improved so that warnings about how we can contribute to BuddyPress docs are better displayed.

Props emaralive

See #9111 (trunk)
Closes https://github.com/buddypress/buddypress/pull/263

#9 @imath
15 months ago

  • Owner set to imath
  • Resolution set to fixed
  • Status changed from new to closed

In 13790:

BP Hello screen: only display it to Community Site Admins

This screen targets Community Site Admins to inform them about the top features included in a new version of the plugin, its full change log as well as to explain how they can get involved into the BuddyPress open source project.

About this last point, the "Get Involved" subpage layout has also been improved so that warnings about how we can contribute to BuddyPress docs are better displayed.

Props emaralive

Fixes #9111 (branch 12.0)

Note: See TracTickets for help on using tickets.