[wp-trac] [WordPress Trac] #60290: Changeset #56635 breaks template loading in multisite network using switch_to_blog()
WordPress Trac
noreply at wordpress.org
Thu Jan 18 23:31:31 UTC 2024
#60290: Changeset #56635 breaks template loading in multisite network using
switch_to_blog()
-----------------------------+------------------------
Reporter: metropolis_john | Owner: joemcgill
Type: defect (bug) | Status: reviewing
Priority: normal | Milestone: 6.5
Component: Themes | Version: 6.4.2
Severity: normal | Resolution:
Keywords: needs-patch | Focuses:
-----------------------------+------------------------
Changes (by joemcgill):
* keywords: => needs-patch
* owner: (none) => joemcgill
* status: new => reviewing
* severity: major => normal
* milestone: Awaiting Review => 6.5
Comment:
Thanks for the report @metropolis_john.
I agree that this is an unexpected change in behavior. I'm curious what
the use case is for calling `get_template_part()` after
`switch_to_blog()`?
A possible fix for this is to move the memoization approach removed in
[57129] to `locate_template()` rather than in the
`get_stylesheet_directory()` and `get_template_directory()` functions
where they previously were implemented.
Related issues:
* #59847
* #60025
--
Ticket URL: <https://core.trac.wordpress.org/ticket/60290#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list