#59417 closed defect (bug) (fixed)
`load-styles.php` no longer outputs styles after deprecating TEMPLATEPATH
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 6.4 | Priority: | highest omg bbq |
| Severity: | normal | Version: | 6.4 |
| Component: | Themes | Keywords: | has-patch |
| Focuses: | template, performance | Cc: |
Description
It looks like load-styles.php no longer outputs anything after r56635.
- Activate TwentyTwentyThree (maybe not necessary)
git checkout ec21b604e0. This is the Git equivalent of r56635.curl -s https://wp-develop.test/wp-admin/load-styles.php?load=l10n,wp-auth-check. You should see empty output.git co @~1. Check out the commit before r56635.curl -s https://wp-develop.test/wp-admin/load-styles.php?load=l10n,wp-auth-check. You should see a couple dozen lines of CSS.
I think the problem may be related to how load-styles.php includes noop.php, so the call to get_option() in get_stylesheet() will return null. Similar things may happen with regards to hooks.
noop.php doesn't include a stub for has_filter(), though, which may cause further unexpected behavior in get_stylesheet_directory().
On wordpress.org we also saw wp-admin load without any CSS, but I wasn't able to quickly reproduce that in a clean install. It may be due to using a parent block theme or some other customization.
Change History (8)
#3
@
2 years ago
It's definitely coming from the changes in https://core.trac.wordpress.org/changeset/56635/trunk/src/wp-includes/theme.php. Reverting those locally has the styles working again.
This ticket was mentioned in PR #5268 on WordPress/wordpress-develop by @flixos90.
2 years ago
#4
- Keywords has-patch added
- The fatal error in
load-styles.phpis happening due to the newly addedhas_filter()calls in https://core.trac.wordpress.org/changeset/56635/trunk/src/wp-includes/theme.php. has_filter()can easily be added tonoop.php, which shouldn't be controversial given that other filter functions are already present there as well.- Just having that function present will fix the bug.
Trac ticket: https://core.trac.wordpress.org/ticket/59417
#5
@
2 years ago
- Milestone changed from Awaiting Review to 6.4
- Owner set to flixos90
- Status changed from new to assigned
This simple patch fixes the fatal error, admin styles working again with that addition: https://github.com/WordPress/wordpress-develop/pull/5268
@flixos90 commented on PR #5268:
2 years ago
#7
Committed in https://core.trac.wordpress.org/changeset/56641
@iandunn Thanks for flagging, I'm looking into it right now.
Either I'll find a solution really quickly, or I'll revert to be able to take a closer look to come up with a fix tomorrow.