- Issue created by @millnut
Would you execute a git bisect operation on a working copy Drupal Core to find the commit that caused this?
- π¬π§United Kingdom millnut
Some further debugging information;
10.4.8 = OK
11.1.8 = OK
11.2.0-beta1@beta = FAIL
11.2.0-rc1@RC = FAILLooking at composer changes, the only difference is Symfony components from 7.2 to 7.3 and Drupal core from 11.1.8 to 11.2.x
- π¬π§United Kingdom millnut
Ok some more debugging after going through the git history of Drupal/Core this failure was introduced by this commit https://github.com/drupal/core/commit/3c297956866bd5f003643770febdbd16a9... from this issue https://www.drupal.org/project/drupal/issues/3416522 π Add the ability to install multiple modules and only do a single container rebuild to ModuleInstaller Active .
Using the commit before https://github.com/drupal/core/commit/154480b82ac75aaa4d6d45696f8de92e7b... the installation goes through correctly without incorrect unmet dependencies.
- πΊπΈUnited States nicxvan
Have you tried adding the filter module dependency?
https://git.drupalcode.org/project/localgov_paragraphs/-/blob/2.x/localg...
You don't have the dependency specified, I think that will likely fix the issue.
- π¬π§United Kingdom millnut
Hi nicxvan yep, I made the change https://github.com/localgovdrupal/localgov_paragraphs/pull/252/files and same error from both phpunit and web ui install and selecting the profile
- π¬π§United Kingdom stephen-cox
Looking at a single test: https://git.drupalcode.org/project/localgov_paragraphs/-/blob/2.x/module...
This fails on Drupal 11.2 with:
Drupal\Core\Config\UnmetDependenciesException: Configuration objects provided by localgov_homepage_paragraphs have unmet dependencies: field.field.paragraph.localgov_featured_campaign.localgov_featured_campaign_image (media.type.image)
The media.type.image config item is provided by the localgov_media module (https://git.drupalcode.org/project/localgov_core/-/blob/2.x/modules/loca...), but is optional config. Moving the YML file into the install directory fixes the test; all config items install without any errors.
Has the way optional config is installed changed? It certainly seems that optional config is not being installed when it should be.
- π¬π§United Kingdom stephen-cox
I've done a bit more digging into this. The LocalGov Media module uses hook_modules_installed to force the install of the optional config in the module (https://git.drupalcode.org/project/localgov_core/-/blob/2.x/modules/loca...), but this hook is not being called before the dependencies for the config in localgov_homepage_paragraphs are being calculated. Which means the config validation is failing.
It's clearly not good to have config that is going to be installed rely on optional config. The reason it currently works this way is much of the config in the media module is copied from the standard profile and would cause errors if the module was enabled with this profile rather than the LocalGov profile.
Ideally, we would want to delay the calculation of dependencies for some modules until after others are enabled. `container_rebuild_required: true` doesn't seem to be doing this.
- πΊπΈUnited States nicxvan
Yeah there was some shuffling of when config is installed.
I think doing the config operations in that hook is generally iffy even if it worked previously.
I pinned @alexpott since I know he worked in this a fair bit.