In, we added functionality to warn the user when configuration has changed since the last config import, to protect site owners from unintentionally overwriting their live configuration with older configuration (for example, if content authors changed configuration on a production site and then additional changes were deployed from the development environment). This warning is displayed when the config differs from the last snapshot, and a snapshot is created on installation and again whenever the user synchronizes their configuration.
Because the first snapshot is created immediately on installation, any configuration change after installation results on the message being "stuck" on the config synch page.
Steps to reproduce
- Install the standard profile.
- Enable (e.g.) the simpletest module.
admin/config/development/configuration. You will see this warning:
Your current configuration has changed. Changes to these configuration items will be lost on the next synchronization:
It's unclear to the user what they're supposed to do because of this warning. Displaying the warning when configuration has never been exported or imported doesn't make sense, and the site owner also has no way to get rid of it. Synching config would remove the error... but there's no changed config to import and so neither drush nor the UI will allow the user to synch. The only workaround would be to export the config, hack it by hand, synch the hacked config, then revert the hack and re-synch.
Beta phase evaluation
|Issue category||Bug because the purpose of the warning is to help the user understand what will happen when configuration is synchronized, but the current behavior instead obfuscates that.|
|Issue priority||Major because this is an issue that will affect every single site owner the first time they try to synchronize configuration, and there is no way to get rid of the misleading warning in a normal workflow (i.e. without hacking the config export).|
There are a couple ways to address this:
- Provide the user with some way to deliberately create a new snapshot.
- Create a new snapshot on export as well as import.
- Don't create a snapshot on installation.
- Display a different warning when the user has never synchronized configuration.
@alexpott and I discussed #2 and ruled it out, because the purpose of the warning is to protect site owners from accidentally reverting live configuration changes. There is no guarantee that the export ends up being incorporated into whatever might be subsequently imported. (For example, a site owner could export configuration on production, then stage configuration from dev over that, and would be back in the situation of not having any way of knowing what's being overwritten.)
#1 could be useful generally, but might introduce its own usability problems, as the user might interpret it as a prompt to create a new snapshot, and then be in the same situation as #2. It could also be combined with other solutions. #1 has been ruled out as adding additionally complexity and features to an already complex UI. Also atm the moment in HEAD the snapshot is only used to produce this warning message. Adding this functionality means that this warning message would then become unreliable.
#3 makes a certain sense, since there's no indication that the site is part of a deployment workflow until a synch happens. However, it would result in sites being in an ambiguous state when the site owner is first setting up their workflow (especially since core does not currently support installing a site from configuration). For example, the site owner might create a copy of the configured site for production, make the production site live, make one change in production, and then still end up unwittingly overwriting that on the first synch. #4 would help avoid that problem.
#4 was implemented as part of writing the patch but it turns out that warning the user at this point actually just detracts from reviewing the changes that are already listed. And in this instance you have no idea what might be different on this site instance since the snapshot is taken on site installation and not when the user actually copied the site. Therefore this solution was rejected.
The implemented solution is #3 which means that message warning that you might be about to overwrite local changes only can occur after an initial import of configuration.
User interface changes
- The warning is not "stuck" on the config synch page after the initial installation.
- A different warning may be added.