Blank page when templates/index.html
exists in classic themes.
#38315
Labels
[Feature] Themes
Questions or issues with incorporating or styling blocks in a theme.
Needs Technical Feedback
Needs testing from a developer perspective.
[Status] Blocked
Used to indicate that a current effort isn't able to move forward
[Type] WP Core Ticket
Requires an upstream change from WordPress. Core Trac ticket should be linked.
Description
See the related Trac ticket: https://core.trac.wordpress.org/ticket/54910
If a classic theme has
templates/index.html
, which may be empty or have non-block HTML markup in it, it can be incorrectly identified as a block theme. For example, some developers and/or hosts, whether good practice or not, can place anindex.html
file in every directory to prevent directory listing. Alternatively, some classic themes may have other uses fortemplates/index.html
, and the classic theme may not be actively, or regularly, maintained. This has resulted in some users receiving a white screen upon updating to 5.9.An idea from @carolinan in the Trac ticket above suggested checking
templates/index.html
for block markup. The patch aims to do exactly that. However, this needs insights and evaluation from the editor team regarding block theme architecture and we also need to consider performance. We've implemented caching usingWP_Theme::cache_get()/add()/delete()
to help with this.Step-by-step reproduction instructions
templates/index.html
.Editor
item will be available and the frontend will (likely) outputEmpty template: Index
.templates/index.html
.Editor
item will be available.This block has encountered an error and cannot be previewed.
..wp-site-blocks
.Screenshots, screen recording, code snippet
No response
Environment info
No response
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: