Active
Project:
Devutils
Version:
2.0.0
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
26 Apr 2025 at 13:55 UTC
Updated:
4 Jun 2025 at 23:51 UTC
Jump to comment: Most recent
When there are configurations inside a collection, the module does not import them correctly.
1. Create a module with a configuration collection structure:
my_module/
config/
config1.yml
language/
es/
config1.yml
2. Add an update hook to import configuration:
function my_module_update_11101() {
\Drupal::service('devutils.update_import')
->import('my_module', [
'config1',
]);
}
3. Run the update.
Expected:
Both config1.yml and language/es/config1.yml should be imported.
Actual:
Only config1.yml is imported; the language.es collection is ignored.
Comments
Comment #2
jleon1110 commentedThe problem is that in the hook used, only one file, config1.yml, is being imported.
I haven't tested it yet, but according to the documentation, this configuration should allow importing both files exclusively.
Comment #3
ruby232 commentedI think it's better to automatically add the language collection and only import it if the corresponding configuration files exist.