- Issue created by @longwave
- 🇬🇧United Kingdom longwave UK
If I rearrange the code and add
container_rebuild_required: true
to the submodule that contains the config, then the test passes again. However if this is the solution, it would be nice to be able to trigger a rebuild *after* Experience Builder is installed, instead of *before* any dependency is installed, but I don't think there is a way to do that right now. - 🇬🇧United Kingdom catch
We talked about using the dependency graph in 📌 Consider defaulting requires_container_rebuild to FALSE Active but also why is xb using hook_rebuild() and not hook_install()?
- 🇬🇧United Kingdom longwave UK
It creates/manages config entities for all SDCs and block plugins so it needs to react whenever these might change, not just when it is first installed. But perhaps hook_install() will solve the immediate issue, will test.
- 🇬🇧United Kingdom longwave UK
Adding the config in
hook_install()
isn't enough.checkConfigurationToInstall()
is called once before the modules are grouped and before any install hooks are run. In Experience Builder we have a test field that depends on an XB config entity:langcode: en status: true dependencies: config: - experience_builder.component.sdc.experience_builder.image - experience_builder.component.sdc.experience_builder.my-hero - experience_builder.component.sdc.experience_builder.two_column - field.storage.node.field_xb_test - node.type.article module: - experience_builder - xb_test_config_node_article id: node.article.field_xb_test field_name: field_xb_test entity_type: node bundle: article
However
experience_builder.component.sdc.experience_builder.*
is created after Experience Builder is installed. Maybe XB should just ship with these though, given that it would create them anyway? - 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
Even if XB can, won't this cause problems for other contrib/custom modules? 🤔
- 🇬🇧United Kingdom longwave UK
Only ones that depend on config that doesn't exist at the time of install? XB feels like a special case here by generating config at install time; most modules ship with their required config, and then dependencies can depend on that config to exist.