Make WordPress Core

#58449 closed defect (bug) (duplicate)

Site Health shows extra white block on the top

Reported by: amimulihsanmahdi's profile amimulihsanmahdi Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Site Health Keywords: has-patch has-testing-info needs-testing
Focuses: ui, css, administration Cc:

Description

Please check the video: https://www.loom.com/share/b04c93d383674b7a83c9f5812143f3b8

Steps to reproduce the issue:
Go to Tools > Site Health, you will see a white block as shown in the video.

Environment: WordPress Develop (6.3)
Theme: Twenty Twenty-Three
PHP Version: 7.4.33

Device used: Macbook Air 2020(M1)
Browser: Google Chrome

Attachments (4)

58449.diff (332 bytes) - added by mikinc860 17 months ago.
58449.2.diff (658 bytes) - added by mikinc860 17 months ago.
Updated Diff file
58449.3.diff (463 bytes) - added by mikinc860 17 months ago.
Diff updated with optimization
sticky issue wp core.png (83.7 KB) - added by dhruvishah2203 16 months ago.

Download all attachments as: .zip

Change History (25)

#1 @sabernhardt
17 months ago

  • Keywords reporter-feedback added; needs-patch removed

Hi and welcome to WordPress Core Trac!

That gray space above the menu looks like the margin from the php-error class, though no PHP error is visible. Related: #35155, #51073, #51383

Please try a few things:

  1. Verify that the body element has the php-error class (using your browser's inspect element tool).
  2. Then try highlighting all content on the Site Health page to make sure there is no PHP notice at the top of the page (in a very light text color).
  3. Check whether the error might be suppressed, as described on #51383. If so, this would be a duplicate of that ticket.

@mikinc860
17 months ago

#2 @mikinc860
17 months ago

  • Keywords has-patch dev-feedback needs-design-feedback added

The margin-top was added only to the left nav panel when the php-error class was in the body. Based on that, I have added the margin-top 2em to the right content section so now they both have a similar margin at the top while there is a php-error class in the body.

@mikinc860
17 months ago

Updated Diff file

#3 @chiragrathod103
17 months ago

@mikinc860 Your diff looks good to me, but you should add only one media query for the above 600px screen, no need to add other CSS.

Last edited 17 months ago by chiragrathod103 (previous) (diff)

@mikinc860
17 months ago

Diff updated with optimization

#4 @chiragrathod103
17 months ago

@mikinc860 And could we also add a margin on the top nav menu( or below all errors message )?

https://prnt.sc/qLGOMVgfGvA5

Last edited 17 months ago by chiragrathod103 (previous) (diff)

#5 @audrasjb
16 months ago

  • Keywords needs-testing has-testing-info added; reporter-feedback dev-feedback needs-design-feedback removed

Hello,

I didn't notice this ticket, but I think PR 4561 should fix both #58455 and #58449 (this ticket).

Testing steps:

  1. Ensure you have WP_DEBUG / WP_DEBUG_DISPLAY set to true
  1. Copy the following sample code in your functions.php file (or in a custom mu-plugin for example) to generate a warning on the admin.
add_action( 'init', function() {
	0 / 0;
} );
  1. Go to Privacy Settings screen and to Site Health screen and ensure the white background header is aligned to the menu.

#6 @audrasjb
16 months ago

  • Milestone changed from Awaiting Review to 6.3

#7 @sabernhardt
16 months ago

  • Keywords reporter-feedback added

The suggested patches seem to go with #58455, but the video shows a margin without any error message. This might be a case where the php-error class does not belong on the body element.

#8 @amimulihsanmahdi
16 months ago

  • Keywords reporter-feedback removed

The issue is happening and I found that the below CSS is causing the issue:

.php-error #adminmenuback, .php-error #adminmenuwrap {
    margin-top: 2em;
}

Please check the video: https://www.loom.com/share/183980f4b9644d5a9869c486a0edff65

WP_DEBUG is on and still, there isn't any error showing on the site health page. Also, the issue did not appear on the Privacy Screen.

#9 @monzuralam
16 months ago

Test Report

Environment

  • Hardware: HP 11th Gen Intel(R) Core(TM) i5-1155G7 @ 2.50GHz 2.50 GHz
  • OS: Windows 11
  • Browser: Chrome 114.0.5735.110
  • Server: Apache/2.4.56
  • PHP: 8.0.29
  • WordPress: 6.3-alpha-55905
  • Theme: twentytwentythree v1.1
  • Active Plugins: gutenberg v16.0.0-rc.4

Steps to Reproduce

  1. Navigate Dashboard > Tools
  2. Tools > Site Health
  3. Mouse Scroll

Expected Results

When testing a patch to validate it works as expected:

  • ✅ Working as well.

Supplemental Artifacts

Image - https://awesomescreenshot.s3.amazonaws.com/image/4537235/40673256-3f2dd63ceafc0227a3a8424852595191.png
Video - https://www.awesomescreenshot.com/video/18251778?key=5983dcfa290b86719057dcbdeeb641de

This ticket was mentioned in Slack in #core by mukeshpanchal27. View the logs.


16 months ago

#11 @mukesh27
16 months ago

  • Keywords changes-requested added; needs-testing removed

This ticket was discussed during the bug scrub.

@audrasjb There is some feedback on PR that need to address. The test report confirm that it working fine.

#12 @dhruvishah2203
16 months ago

I have verified the PR with the above-given suggestion and it looks good to me. I have added the screenshot of the result.

#13 @oglekler
16 months ago

#58455 looks like the right place to keep the discussion, I requested changes there.

This ticket was mentioned in Slack in #core by chaion07. View the logs.


15 months ago

This ticket was mentioned in Slack in #core by oglekler. View the logs.


15 months ago

#16 @oglekler
15 months ago

  • Keywords needs-testing added; changes-requested removed

Fix in #58455 needs testing

This ticket was mentioned in Slack in #core by chaion07. View the logs.


15 months ago

#18 @audrasjb
15 months ago

  • Milestone changed from 6.3 to 6.4

Moving to 6.4 alongside #58455.

#19 @audrasjb
15 months ago

  • Version trunk deleted

This ticket was mentioned in Slack in #core by marybaum. View the logs.


13 months ago

#21 @marybaum
13 months ago

  • Milestone 6.4 deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Based on the assessment that this ticket actually is part of what needs fixing on #58455, I will close this ticket as a duplicate.

Note: See TracTickets for help on using tickets.