[wp-trac] [WordPress Trac] #54910: 5.9 Bug - Blank Home Page

WordPress Trac noreply at wordpress.org
Tue Feb 1 22:26:19 UTC 2022


#54910: 5.9 Bug - Blank Home Page
--------------------------------------+------------------------------
 Reporter:  cantuaria                 |       Owner:  (none)
     Type:  defect (bug)              |      Status:  new
 Priority:  normal                    |   Milestone:  Awaiting Review
Component:  Themes                    |     Version:  5.9
 Severity:  major                     |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+------------------------------

Comment (by ironprogrammer):

 Thank you for continuing to explore this, @costdev and @manfcarlo.

 While [https://github.com/WordPress/wordpress-develop/pull/2247 PR #2247]
 avoids parsing `index.html`, in favor of checking for other files while
 identifying block themes, it raises a couple of conerns:

 - In the context of the reported issue for this ticket -- having an
 existing `templates/index.html` file that doesn't contain blocks -- the
 theme is still incorrectly classified as FSE.
 - Going in the opposite direction, any implicit disallowed files would
 break FSE support. For instance, if an FSE theme included a `.md` or
 `.txt` reference file, or had a "shelved" HTML file, like `.html.bak`
 during development, as well as numerous other dotfiles that might sneak
 in. This could unintentionally hamper the FSE theme building workflow.

 The implication with this approach is that block theme templates must ONLY
 have `.html` files in their directories, and that classic/hybrid themes
 must never do this. But as unconventional as it may appear, there are no
 rules against structuring a classic theme to use HTML in a `templates`
 folder, nor against plugins leveraging that folder for templated overrides
 built in HTML. These are only problematic now that FSE has come along with
 new assumptions.

 Given the flexibility with theming afforded by WordPress, I'm not sure how
 we can know the intent of such files without parsing
 `templates/index.html`, ''when it exists''. Since FSE themes do not need
 to "register" themselves, and there are no rules restricting
 subdirectories, it is up to WordPress to best understand their intent. The
 logic is slightly more complex, but [https://github.com/WordPress
 /wordpress-develop/pull/2240 PR #2240] is in a better position to make the
 determination as to whether the theme is ''intentionally'' targetting FSE.

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


More information about the wp-trac mailing list