[wp-trac] [WordPress Trac] #27697: wp-admin.css class="hidden" bug renders screen options menu in admin blank

WordPress Trac noreply at wordpress.org
Tue Aug 23 05:33:50 UTC 2022


#27697: wp-admin.css class="hidden" bug renders screen options menu in admin blank
-------------------------------------+-------------------------------------
 Reporter:  grabmedia                |       Owner:  (none)
     Type:  defect (bug)             |      Status:  new
 Priority:  normal                   |   Milestone:  6.1
Component:  General                  |     Version:  3.8.1
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |     Focuses:  ui, javascript,
  has-testing-info                   |  administration
-------------------------------------+-------------------------------------

Comment (by costdev):

 == Test Report

 Patch tested:
 [https://core.trac.wordpress.org/attachment/ticket/27697/27697.2.diff
 27697.2.diff]

 === Steps to Reproduce or Test
 1. In `wp-content/plugins`, create a new file called `hidden-test.php`
 with the following contents:
 {{{#!php
 <?php

 /**
  * Plugin Name: Hidden Test
  * Description: Add <code>.hidden</code> styling to admin area.
  * Author:      WordPress Core Contributors
  * Author URI:  https://make.wordpress.org/core
  * License:     GPLv2 or later
  * Version:     1.0.0
  */

 add_action( 'admin_head', 'wpcore_add_hidden_class_to_admin' );
 function wpcore_add_hidden_class_to_admin() {
         echo '<style>.hidden{display:none;visibility:hidden}</style>';
 }
 }}}
 2. In the admin area, navigate to `Plugins > Installed Plugins` and
 activate `Hidden Test`.
 3. 🐞 To the top right, click `Screen Options`.
 4. When testing the patch:
   - Run `grunt patch:27697` and select `27697.2.diff`.
   - Run `sudo npm run build:dev`.
   - Refresh the admin page and to the top right, click `Screen Options`.

 === Expected Results
 When reproducing a bug:
 - ❌ The `Screen Options` tab opens, but the content is hidden.

 When testing a patch to validate it works as expected:
 - ✅ The `Screen Options` tab opens, and the content is visible.

 === Environment
 * Server: Apache (Linux)
 * WordPress: 6.1-alpha-53344-src
 * Browser: Chrome 104.0.0.0
 * OS: Windows 10
 * Theme: Twenty Twenty-One
 * Plugins:
   * Hidden Test 1.0.0

 === Actual Results
 When reproducing a bug/defect:
 - ❌ The `Screen Options` tab opens, but the content is hidden. Issue
 reproduced.

 When testing the bugfix patch:
 - ✅ The `Screen Options` tab opens, and the content is visible. Issue
 resolved with patch.

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

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/27697#comment:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list