Skip to content

Default settings not working as expected in multisite #218

Closed

Description

@gagan0123

Bug Description

When we install the plugin in a multisite environment and "Network Activate" the plugin, the default settings are only saved for the main site and not all the sites in the network.

Steps to reproduce

  1. Install Performance Lab plugin in a WordPress multisite environment
  2. "Network Activate" the plugin
  3. Check the default settings for the Performance Lab plugin in any site other than main site

Screenshots

As can be seen none of the options are selected.
image

Additional Context

Activity

  1. self-assigned this
    on Mar 8, 2022
  2. added
    [Type] BugAn existing feature is broken
    InfrastructureIssues for the overall performance plugin infrastructure
    Needs DevAnything that requires development (e.g. a pull request)
    on Mar 8, 2022
  3. added this to the 1.0.0-beta.2 milestone on Mar 8, 2022
  4. felixarntz commented on Mar 8, 2022

    @felixarntz
    Member

    Activation hooks are unfortunately unreliable on certain environments like multisite or when using WP-CLI, which is a long-standing problem with WordPress core that is extremely hard to fix. Fortunately, in the case here, it is possible to remove the hook entirely and replace it by using a default value for our modules setting.

    I'm currently working on a pull request to implement that, in a way that we don't have to manually maintain this list of modules and in a way that it also doesn't read the filesystem on every page load.

  5. added and removed
    Needs DevAnything that requires development (e.g. a pull request)
    on Mar 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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