-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Installing localgov_forms when webforms already installed overwrites webform settings #34
Comments
This came up at BHCC when we tried to install localgov_forms within a site that already had webforms enabled and our settings got overwriten with the config from We can get around this behaviour by commenting that out on initial install, or pathching the module. Ideally, we should move these settings to a submodule, labelled Localgov_forms_ideal_settings or something similar, so existing webform enviornment is left alone unless the submodule is enabled. |
If you move them to |
Currently this is executed during module install function localgov_forms_install() {
// Override Webforms default configuration.
$config = \Drupal::configFactory()->getEditable('localgov_forms.webform.settings');
$settings = \Drupal::configFactory()->getEditable('webform.settings');
$settings->setData($config->get())->save();
} |
Yes I think this might cause multiple issues. What are the differences from the default? |
@Adnan-cds mentions this as an issue to resolve before a stable release. First step is to remove the default config from the install hook. As a follow up , we might want to review the default config and make a more intelligent default config if we are installing webform for the first time, but not if it is already installed. Question: how different is that config from Webform's default? |
Suggested changes for the default Webform settings:
|
Discussing in Merge Monday, sounds like a good starting point! Note that this is just the starting point, developers are likely to go on and configure Webform as needed. |
Having recently installed localgov forms, discovered that webform settings were overwritten. Could this be amended to check the is_syncing flag and so avoid overwriting current setting?
The text was updated successfully, but these errors were encountered: