[wp-trac] [WordPress Trac] #54596: Block theme with period in name causes blank editor

WordPress Trac noreply at wordpress.org
Mon Dec 20 16:00:53 UTC 2021


#54596: Block theme with period in name causes blank editor
----------------------------------------+-----------------------------
 Reporter:  mkaz                        |       Owner:  hellofromTonya
     Type:  defect (bug)                |      Status:  reopened
 Priority:  normal                      |   Milestone:  5.9
Component:  REST API                    |     Version:  trunk
 Severity:  normal                      |  Resolution:
 Keywords:  has-testing-info has-patch  |     Focuses:
----------------------------------------+-----------------------------
Changes (by hellofromTonya):

 * keywords:  has-testing-info needs-testing has-patch => has-testing-info
     has-patch


Comment:

 = Test Report

 Env:
 - OS: macOS Big Sur 11.6
 - Browsers: Edge
 - Theme: Copies of TT2 with directory name changed (see test info)
 - Plugins: None
 - WordPress: trunk
 - Patch: [https://github.com/WordPress/wordpress-develop/pull/2064 PR
 2064]
 - Localhost: wp-end

 == Steps

 1. Prepare first theme:
    * Copy `wp-content/themes/twentytwentytwo/` to `wp-content/themes/tt2é
 [v1.0.0] {@!$,^~}(-_-)/`
    * In copied theme, open `style.css` and change the `Theme Name` to
 `tt2é [v1.0.0] {@!$,^~}(-_-)`
    * Open the `theme.json` and change the background color of `#000000` to
 `#FF0000` (visual cue that this theme resolves)
 2. Prepare second theme:
    * Copy `wp-content/themes/tt2é [v1.0.0] {@!$,^~}(-_-)/` to `wp-
 content/themes/subdir/tt2é [v1.0.0](-_-)/`
    * Open `style.css` and change the `Theme Name` to `subdir/tt2é
 [v1.0.0](-_-)`
    * Open the `theme.json` and change the background color of `#FF0000` to
 `#00FF00` (visual cue that this theme resolves)
 3. Go to Appearance > Themes
 3. Activate the `subdir/tt2é [v1.0.0](-_-)` theme (the one in the
 subdirectory)
 4. Click its "Customize" button
 Expected behavior: The Site Editor should load and the header background
 should be a bright green color.
 5. Click on the W logo which opens the Site Editor's sidebar
 6. Navigate to `Templates`
 Expected behavior: The `Added by` column should list `subdir/tt2é
 [v1.0.0](-_-)`. (See the left side of [attachment:"test-
 pr2064-macos.gif"].)
 7. View the site in the frontend.
 8. Repeat steps 4 through 7 with the `wp-content/themes/tt2é [v1.0.0]
 {@!$,^~}(-_-)/` theme.
 Expected behavior: The header background color should red and "Added by"
 column should list `tt2é [v1.0.0] {@!$,^~}(-_-)`. (See the right side of
 [attachment:"test-pr2064-macos.gif"].)
 9. Repeat steps 4 through 7 with the `wp-content/themes/twentytwentytwo/`
 theme.
 Expected behavior: The header background color should black and "Added by"
 column should list `Twenty Twenty-Two`.

 == Results

 - Twenty Twenty-Two theme loads properly ✅
 - `wp-content/themes/tt2é [v1.0.0] {@!$,^~}(-_-)/` loads properly ✅
 - `wp-content/themes/subdir/tt2é [v1.0.0](-_-)/` loads properly ✅
 - Copying TT2 `wp-content/themes/sudir/tt2` loads properly ✅ (an extra
 test I did)

 Works as expected ✅

 Notes:

 - On Mac, themes named with `&`, `=`, `%` characters do not load in the
 Site Editor. No 404 (so the route is found). `Uncaught (in promise)
 TypeError: Cannot destructure property 'id' of '(intermediate value)' as
 it is null.` error in the console. Suspect this is due to encoding.
     - Theme directories named with these characters are likely far edge
 cases.

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


More information about the wp-trac mailing list