[wp-trac] [WordPress Trac] #54910: 5.9 Bug - Blank Home Page
WordPress Trac
noreply at wordpress.org
Sat Jan 29 06:57:23 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 costdev):
@ironprogrammer and @manfcarlo Thanks for your comments!
> This patch turns a fairly readable method into something that looks
quite mystifying and difficult to make sense of.
Can you identify the areas that are difficult to make sense of so that I
can make it clearer?
> It duplicates exactly the same issue at hand, by assuming that any theme
that happens to have a full-site-editing tag is a block theme.
The [https://make.wordpress.org/themes/handbook/review/required/theme-tags
/#features-tags Handbook entry for theme tags] states:
Full Site Editing – support for block content areas (experimental)
and it links to the [https://developer.wordpress.org/block-editor/how-to-
guides/themes/block-theme-overview/ Handbook entry for Block themes].
The PR doesn't aim to require theme authors to add `Tags: full-site-
editing` to their themes. It aims to take advantage of a theme that
explicitly identifies itself as a block theme.
However, the patch is still a work in progress and the progress we've made
means that the `full-site-editing` tag was, until now, the only way to
identify a block theme when there is an empty
`(block-)templates/index.html` file.
> Use scandir to check whether there are any non-html files in the
templates folder, in addition to the existing check.
I'm interested in possibly including this approach. Before I go and
implement this and add unit test data, can we get some more opinions on
this approach from both architectural and performance perspectives?
**Note:** Performance is a key concern here. If we ''do'' implement this
and, in future, the list of valid index templates files includes other
files in the `(block-)templates` trees, then at that point a
`$directories_to_skip` mechanism should be included for this check. I can
implement this now, but I'm hesitant to add code that doesn't apply to the
files we're currently checking for.
> In this case, the only false positives would occur if the theme has a
templates folder with index.html and only other html files, which is not
impossible but seems highly unlikely.
Absolutely, it is not impossible - but I agree that it's highly unlikely.
I couldn't find any themes in the theme directory that have this, for
example.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/54910#comment:42>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list