[wp-trac] [WordPress Trac] #59861: WordPress 6.4 – Initial theme activation works, page reload claims missing stylesheet
WordPress Trac
noreply at wordpress.org
Thu Nov 9 09:25:17 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 | Keywords:
Focuses: template |
--------------------------+-----------------------------
Wordpress 6.4 breaks my theme setup.
Rolling back to 6.3 fixes this, but I would like to be able to update and
run the latest versions. I have 50+ themes built on the same boiler plate,
so if they all start updating, I have a big problem.
Case: When I activate the theme, WordPress tells me the theme is
successfully activated:
[[Image(https://i.imgur.com/7tGrDeu.png)]]
This is also reflected in my database:
[[Image(https://i.imgur.com/1sMwhW6.png)]]
Visiting the page works, everything works.
UNTIL one visits the themes.php-page again:
[[Image(https://i.imgur.com/m7d2Ss4.png)]]
I suspect this is because my `stylesheet`-value in the database contains
`/templates`, which is added with this function:
```
add_filter('stylesheet', function ($stylesheet) {
return dirname($stylesheet);
});
add_action('after_switch_theme', function () {
$stylesheet = get_option('stylesheet');
if (basename($stylesheet) !== 'templates') {
update_option('stylesheet', $stylesheet . '/templates');
}
});
```
I NEED the `stylesheet`-structure to be `theme-name/templates`, otherwise
I just get a white page with no content whatsoever.
[[Image(https://i.imgur.com/yKiehqx.png)]]
So, I either need to find a fix for the page, so it works with `wp-theme-
ohd` as the value for both the `template` and `stylesheet`, or WordPress
needs to fix what they changed when shifting to 6.4, since it worked
perfectly fine and problem free on 6.3.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/59861>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list