Opened 6 years ago
Closed 4 years ago
#46205 closed defect (bug) (invalid)
CSS stylesheet ID becoming munged under WP.
Reported by: | richardfoley | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 5.0.3 |
Component: | General | Keywords: | |
Focuses: | Cc: |
Description
We had a weird timeout delay for some users on the site and narrowed it down to a non-existent stylesheet reference. Further searching produced the following debug statements around
wp-includes/class.wp-styles.php line 191
and below.
PHP message: B tag=<link rel='stylesheet' id='generate-child-css' href='https://www.naktiv.net/wp-content/themes/naktiv-generatepress/style.css?ver=1549205521' type='text/css' media='all' /> PHP message: C tag=<link rel='stylesheet' id='generate-child-css' href='https://www.naktiv.net/wp-content/themes/naktiv-generatepress/style.css?ver=1549205521' type='text/css' media='all' /> PHP message: A handle=1549205521 PHP message: B tag=<link rel='stylesheet' id='1549205521-css' href='https://www.naktiv.netall?ver=5.0.3' type='text/css' media='all' /> PHP message: C tag=<link rel='stylesheet' id='1549205521-css' href='https://www.naktiv.netall?ver=5.0.3' type='text/css' media='all' />" while reading upstream, client: 91.126.35.66, server: naktiv.net, request: "GET /docs/help/ HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php7.2-fpm.sock:", host: "www.naktiv.net", referrer: "https://www.naktiv.net/docs/help/"
You can see that the initial tag string has a ?ver=1549205521
appended.
The $handle
variable appears to take this version string and then apply it as the name of the -css
file, creating id='1549205521-css'
. Which is almost certainly wrong.
This in turn leads to a non-existent URL: href='https://www.naktiv.netall?ver=5.0.3'
on the https://www.naktiv.net
site.
Maybe someone can take a look at this?
Change History (2)
Note: See
TracTickets for help on using
tickets.
Hi @richardfoley !
Sorry about the late response. This would have fit better in the support forums.
I see your site no longer has stylesheet references like this, with WordPress 5.5.1. You pointed out line 191, which involves the
style_loader_tag
filter. So it likely was a problem within your theme or a plugin, not a core bug.