You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Default settings not working as expected in multisite #218
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
Install Performance Lab plugin in a WordPress multisite environment
"Network Activate" the plugin
Check the default settings for the Performance Lab plugin in any site other than main site
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.
Activity
felixarntz commentedon Mar 8, 2022
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.