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

WordPress Trac noreply at wordpress.org
Fri Dec 15 07:37:33 UTC 2023


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

Comment (by Rvervuurt):

 @jorbin I just tested locally, and it doesn't work on 6.4.2

 Initially, the theme seems to be activated perfectly fine. A reload
 doesn't do anything, the theme is still activated.

 When checking the frontpage, it's just white, but no errors in my log.
 Reloading the frontpage breaks the theme and outputs "There Has Been a
 Critical Error on Your Website" and in the log, the theme seems to break
 because it can't find a custom function that's in our functions.php.

 This is probably because it's looking for the functions.php-file in my
 `/templates`-folder, while it's in the root folder.

 If I symlink my functions-file in my `/templates`, the page works sort-of,
 it just can't find my stylesheets, which are not in
 `/templates/dist/styles`, but in the root folder in `dist/styles/`.

 I found out that moving all files from my templates folder into my root
 folder fixes the problem, and we are slowly doing this for all our clients
 right now.

 Here's the custom stuff we do in the theme, which I remove when moving all
 files from `templates` to the root folder:
 https://pastebin.com/fxsMQxRh

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


More information about the wp-trac mailing list