Make WordPress Core

#56947 closed defect (bug) (duplicate)

Gap above admin menu when plugins folder does not exist

Reported by: ironprogrammer's profile ironprogrammer Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Administration Keywords:
Focuses: Cc:


The absence of the /wp-content/plugins directory causes a gap to appear above the admin menu. This gap can be seen on the following pages:


The gap (margin) is applied to #adminmenuback and #adminmenuwrap (encloses the admin menu) through the .php-error class on <body>, though no error is logged.

Steps to Reproduce

  1. Delete the plugins folder inside /wp-content (do not delete wp-content itself!)
  2. Navigate to one of the above identified pages, e.g. /wp-admin/plugins.php.
  3. 🐞 Observe the margin between the admin menu and header bar (Figure 1).

Expected Results

When testing a patch to validate it works as expected:

  • ✅ In WP admin, there should not be a gap between the menu bar and admin menu.

When reproducing the bug:

  • ❌ In WP admin, a gap appears above the admin menu (Figure 1).

Supplemental Artifacts

Figure 1

Test Report Icons:
🐞 <= Indicates where issue ("bug") occurs.
✅ <= Behavior is expected.
❌ <= Behavior is NOT expected.

Props peterwilsoncc, priethor, ndiego, wildworks.

Attachments (1)

Screenshot_1.png (30.8 KB) - added by hztyfoon 20 months ago.
There wasn't any gap appeared above the admin menu.

Download all attachments as: .zip

Change History (3)

20 months ago

There wasn't any gap appeared above the admin menu.

#1 @hztyfoon
20 months ago

I just tested It on my windows PC & didn't find this issue.
I tested this on all these pages:


Behavior is expected. ✅
There wasn't any gap appeared above the admin menu.
Looks perfectly all right there. No spaces, No issues.
(It was like: Screenshot_1.png​)

Steps I followed:

  • Installed a fresh WordPress 6.1
  • Deleted the plugins folder inside wp-content (after deleting there was only 2 folders in side wp-content: 'themes' & `uploads')

Environment info:
OS: Windows 10
Server: Apache (version 2.4.46)
PHP Version: 7.4.9
WordPress 6.1

#2 @peterwilsoncc
20 months ago

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

I realised overnight this is a duplicate of #51383, in which the error class is added for suppressed errors.

As it depends on the WP_DEBUG & WP_DEBUG_DISPLAY constants in the wp-config.php file, it may not occur in all circumstances.

I'll close this off as a duplicate of the original ticket to keep the discussion in one place.

Note: See TracTickets for help on using tickets.