[wp-trac] [WordPress Trac] #60909: Classic Theme with theme.json attempts to load templates
WordPress Trac
noreply at wordpress.org
Wed May 1 01:54:21 UTC 2024
#60909: Classic Theme with theme.json attempts to load templates
--------------------------------------+---------------------
Reporter: CookiesForDevo | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 6.5.3
Component: Themes | Version: 6.5
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests | Focuses:
--------------------------------------+---------------------
Comment (by grantmkin):
> What are the thoughts on if $fallback_template is falsey, to skip
prepare_item_for_response and keep the return value the same.
I don't particularly like the inconsistency of other methods in the
templates controller returning a 404 error when a template isn't found,
but the fallback route returning a 200 status with an empty response. But
I see how this makes sense for a minor release, to minimize changes.
I've updated the wordpress-develop PR to skip prepare_item_for_response
and return an empty object when the fallback template isn't found.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/60909#comment:22>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list