WordPress.org

Make WordPress Core

Opened 8 months ago

Last modified 8 months ago

#46205 new defect (bug)

CSS stylesheet ID becoming munged under WP.

Reported by: richardfoley Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 5.0.3
Component: General Keywords:
Focuses: Cc:
PR Number:

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 (1)

This ticket was mentioned in Slack in #forums by joyously. View the logs.


8 months ago

Note: See TracTickets for help on using tickets.