[wp-trac] [WordPress Trac] #59861: WordPress 6.4 – Initial theme activation works, page reload claims missing stylesheet

WordPress Trac noreply at wordpress.org
Tue Dec 19 15:07:01 UTC 2023


#59861: WordPress 6.4 – Initial theme activation works, page reload claims missing
stylesheet
-------------------------------+------------------------
 Reporter:  Rvervuurt          |       Owner:  (none)
     Type:  defect (bug)       |      Status:  closed
 Priority:  normal             |   Milestone:
Component:  General            |     Version:  6.4
 Severity:  major              |  Resolution:  duplicate
 Keywords:  reporter-feedback  |     Focuses:  template
-------------------------------+------------------------
Changes (by joemcgill):

 * status:  new => closed
 * resolution:   => duplicate
 * milestone:  Awaiting Review =>


Comment:

 Hi @Rvervuurt. It seems to me that what you're describing is likely due to
 the same root cause I described in
 [https://core.trac.wordpress.org/ticket/60025#comment:6 #60025].

 Essentially, setting the stylesheet directory option in the DB and then
 filtering the `get_stylesheet()` function that returns that option from
 the DB was making use of a race condition where the `STYLESHEETPATH`
 environment variable used in `locate_template()` prior to 6.4.0 would get
 set to the DB option before the theme was initialized and the filter was
 added. This workaround could be used to load templates from a subdirectory
 of the theme, while making sure other theme files and stylesheets would be
 referenced from the root of the theme.

 I'm going to close this as a duplicate of #60025 so we can keep
 discussions about a fix in one place. Feel free to follow and add details
 to the discussion on that ticket.

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


More information about the wp-trac mailing list