[wp-trac] [WordPress Trac] #60290: Changeset #56635 breaks template loading in multisite network using switch_to_blog()

WordPress Trac noreply at wordpress.org
Mon Jan 22 23:32:43 UTC 2024


#60290: Changeset #56635 breaks template loading in multisite network using
switch_to_blog()
--------------------------------------+--------------------------
 Reporter:  metropolis_john           |       Owner:  joemcgill
     Type:  defect (bug)              |      Status:  accepted
 Priority:  normal                    |   Milestone:  6.5
Component:  Themes                    |     Version:  6.4.2
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:  performance
--------------------------------------+--------------------------
Changes (by joemcgill):

 * status:  reviewing => accepted
 * focuses:   => performance


Comment:

 I've come up with a possible fix for this issue that ensures
 `locate_template()` uses the original site's theme whenever in a
 `switch_to_blog` context. @metropolis_john could you see if something like
 this would work in your context?

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


More information about the wp-trac mailing list