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

WordPress Trac noreply at wordpress.org
Tue Jan 23 03:14:08 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
--------------------------------------+--------------------------

Comment (by manfcarlo):

 The following was written on the other ticket #60025:

 > This is sounding more and more like a `wontfix` situation since the
 previous behavior was both undocumented and unintentional.

 @joemcgill can you explain how this ticket isn't the same with regard to
 "undocumented and unintentional" behaviour? One would expect that
 `switch_to_blog` switches the blog. If it was intentional to keep
 `locate_template` on the previous blog, it would have been documented in
 the [https://developer.wordpress.org/reference/functions/switch_to_blog/
 code reference] for `switch_to_blog`, but the only exception listed there
 is plugins. It would be disingenuous to say after so many years that the
 omission was intentional.

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


More information about the wp-trac mailing list