-
Notifications
You must be signed in to change notification settings - Fork 130
Closed
Labels
[Plugin] Performance LabIssue relates to work in the Performance Lab Plugin onlyIssue relates to work in the Performance Lab Plugin only[Type] BugAn existing feature is brokenAn existing feature is broken
Milestone
Description
Bug Description
In #1048, support for changing the autoload value for the largest autoloaded options in the Site Health check was added. However, there is a potential bug when the option value is updated through external code, meaning some external code autoloads the option.
Steps to Reproduce
Add filter code to show the site health check.
If you use WP 6.6 version, use the filter:
add_filter( 'site_status_autoloaded_options_size_limit', '__return_zero' );
If you use WP < 6.6 version, use the filter:
add_filter( 'perflab_aao_autoloaded_options_limit_size_in_bytes', '__return_zero' );
- Go to Admin Panel > Site Health > Autoloaded options could affect performance.
- Click on 'Disable autoload' for any option.
- Check that the option is moved to the new disabled option table and removed from the top table.
- Update that option through code
update_option( 'option_name', 'value', true );
. - Reload the site health page.
- See the error. The option is displayed in both tables.
Screenshots
Suggested Approach
We should perform an early check in the disabled table to see if any option is autoloaded again, and if so, remove that option from perflab_aao_disabled_options
so it will not show up again. Additionally, when anyone clicks on "Revert to autoload" for a duplicate option, it shows a Failed to disable autoload.
error.
Metadata
Metadata
Assignees
Labels
[Plugin] Performance LabIssue relates to work in the Performance Lab Plugin onlyIssue relates to work in the Performance Lab Plugin only[Type] BugAn existing feature is brokenAn existing feature is broken
Type
Projects
Status
Done 😃