Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
What are the steps required to reproduce the bug?
- In settings set up a config directory:
$config_directories['sync'] = 'sites/default/files/config/sync';
- Enable all language related modules
- Add a second language (german)
- Go to Structure/Content Types / Article / Manage Fields / Body
- Translate the body help text clicking on "Translate content fields"
- Export all the configurations to the config directory (drush cex)
- Now create a custom directory in web "myconfig" and copy "field.field.node.article.body.yml" file from config directory
- Change the "description" config tag value to a random string
- Run drush cim --source=myconfig --partial
What behavior were you expecting?
Only the original translation version of body configuration description (help text) will change to something else
What happened instead?
- Nothing changes in the body field active configruation
- All the german configuration will be removed from active configuration
- Lot of warnings and notices:
Miscellaneous
The problem is NOT drush related. The same happens if we do it via interface.
Configuration import / export has serious issues when multilingual configuration files are present!
Warning/notices:
Import the listed configuration changes? (y/n): y
array_keys() expects parameter 1 to be array, null given [warning]
StorageReplaceDataWrapper.php:131
array_keys() expects parameter 1 to be array, null given [warning]
StorageReplaceDataWrapper.php:131
array_keys() expects parameter 1 to be array, null given [warning]
StorageReplaceDataWrapper.php:131
array_keys() expects parameter 1 to be array, null given [warning]
StorageReplaceDataWrapper.php:131
array_keys() expects parameter 1 to be array, null given [warning]
StorageReplaceDataWrapper.php:131
Comments
Comment #2
swentel CreditAttribution: swentel commentedThis sounds exactly like #2740983: Configuration system doesn't allow importing a single item from a non-default collection
Comment #3
ssibal CreditAttribution: ssibal commentedExactly! Duplicate, my bad! Closing!
Comment #4
ssibal CreditAttribution: ssibal commented