Skip to content

Default value on settings is not set on new installations #247

@mitogh

Description

@mitogh

Bug Description

When the plugin is installed in a new installation, the default settings for the modules are not used but the UI on the settings reflect the usage of the default settings for each module, which would indicate visualize that the settings are ON but the modules are not in use.

Steps to reproduce

  1. Create a new WP installation or remove all the options of your current site
  2. Install the latest version of the plugin
  3. Go to Performance > Settings and observe the UI that shows the active modules. Make sure to not click the Save button.
  4. Go to the media library and upload a new image
  5. Insert the image into the content and observe no WebP images were created.

Screenshots

2022-03-21_11-49
2022-03-21_11-49_1

Markup of the screenshot:

<img src="https://sadfire.s2-tastewp.com/wp-content/uploads/2022/03/candra-winata-CYOFvtpOIpU-unsplash-1024x678.jpg" alt="" class="wp-image-7" srcset="https://sadfire.s2-tastewp.com/wp-content/uploads/2022/03/candra-winata-CYOFvtpOIpU-unsplash-1024x678.jpg 1024w, https://sadfire.s2-tastewp.com/wp-content/uploads/2022/03/candra-winata-CYOFvtpOIpU-unsplash-300x199.jpg 300w, https://sadfire.s2-tastewp.com/wp-content/uploads/2022/03/candra-winata-CYOFvtpOIpU-unsplash-768x509.jpg 768w, https://sadfire.s2-tastewp.com/wp-content/uploads/2022/03/candra-winata-CYOFvtpOIpU-unsplash-1536x1017.jpg 1536w, https://sadfire.s2-tastewp.com/wp-content/uploads/2022/03/candra-winata-CYOFvtpOIpU-unsplash-2048x1356.jpg 2048w, https://sadfire.s2-tastewp.com/wp-content/uploads/2022/03/candra-winata-CYOFvtpOIpU-unsplash-1200x795.jpg 1200w, https://sadfire.s2-tastewp.com/wp-content/uploads/2022/03/candra-winata-CYOFvtpOIpU-unsplash-1980x1311.jpg 1980w" sizes="(max-width: 1024px) 100vw, 1024px" width="1024" height="678">

Workaround

Currently, the workaround for this bug is

  • once, the plugin is activated
  • go to Performance > Settings
  • click on Save.

Metadata

Metadata

Assignees

Labels

InfrastructureIssues for the overall performance plugin infrastructure[Type] BugAn existing feature is broken

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions