Problem/Motivation
This is a follow-up from #3337864: Ensure "Site default language' is used when installing config by any means and is updated correctly which fixes the case where a module install creates configuration in english only to have locale try and fix it later.
Steps to reproduce
Add configuration to a module with a langcode not supported by the site - install the module. The configuration will exist in this language.
Create a configuration entity with an unsupported langcode or a simple configuration object and save it.
Proposed resolution
Change the langcode as part of the ConfigInstaller and either:
- skip it
- change it to the default langcode
- error about it using \Drupal\Core\Config\ConfigInstaller::checkConfigurationToInstall()
It's trickier to know what to do about runtime (as opposed to install time) checks - potentially we should just recommend using config validation as that will error on this problem already.
Comments
Comment #2
alexpottWe should not attempt to fix this till #3337864: Ensure "Site default language' is used when installing config by any means and is updated correctly is solved.