[wp-trac] [WordPress Trac] #55270: Option can_compress_scripts not autoload causing extra DB query on every request
WordPress Trac
noreply at wordpress.org
Mon May 29 15:51:10 UTC 2023
#55270: Option can_compress_scripts not autoload causing extra DB query on every
request
--------------------------------+---------------------------
Reporter: RavanH | Owner: spacedmonkey
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: 6.3
Component: Options, Meta APIs | Version:
Severity: minor | Resolution:
Keywords: needs-patch | Focuses: performance
--------------------------------+---------------------------
Changes (by azaozz):
* keywords: has-patch commit => needs-patch
* status: closed => reopened
* resolution: fixed =>
Comment:
Not sure what's going on here but the patch doesn't seem to be doing what
the ticket description and the commit message is saying?
1. The problem this ticket it trying to solve is that on older sites the
`can_compress_scripts` option was added with `autoload = 'no'`. This patch
was supposed to delete the old option and replace it with a new one with
`autoload = 'yes' which is the default. That should happen for both single
site and multisite, however that is not the case? In addition there seem
to be plugins that check this option so it has to be set.
2. The conditional that runs either `update_option()` or
`update_site_option()` doesn't seem to be doing anything as that code runs
"once in a blue moon". I.e. this part of the patch is totally pointless.
3. The `'yes'` in `update_option( 'can_compress_scripts', 0, 'yes' );` is
redundant and doesn't do anything.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/55270#comment:18>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list