I have a bug or a misconfiguration I don't understand. I'm creating a profile to create new web sites with an advance configuration quickly. But I meet a bug during installation with dependencies of with some configurations.

On image style, I add a manual `crop type than I add on the majority image style. For example, my file for image style large is:

langcode: fr
status: true
    - crop.type.crop_1x1
    - crop
name: large
label: 'Large (480×480)'
    uuid: ddd73aa7-4bd6-4c85-b600-bdf2b1628d1d
    id: image_scale
    weight: -9
      width: 480
      height: 480
      upscale: false
    uuid: 7cd03233-541d-472e-851c-de8945ee6709
    id: crop_crop
    weight: -10
      crop_type: crop_1x1

I put all images style configuration file in the directory optional in config directory. My configuration files for crop and the crop type are in the install directory. Despite this, when I test my installation, I have always the error message :

Drupal\Core\Config\UnmetDependenciesException: Configuration objects provided by image have unmet dependencies: image.style.large (crop.type.crop_1x1, crop) in Drupal\Core\Config\UnmetDependenciesException::create() (line 98 of /var/www/html/core/lib/Drupal/Core/Config/UnmetDependenciesException.php).

I have no configuration which are dependent of image module in install directory. Image module is always enable before Crop module instead of to respect dependencies. I tried to put my configuration files for crop in optional but it doesn't fix the problem, I don't know if change the order of modules in dependencies of my profile have an influence. I try without success.

I don't see where is the error in my installation.

Update: This problem happens only with default configuration of image module, that is image.style.large, image.style.medium and image.style.thumbnail which are the native configuration. I have other styles which are import later, after crop module is enable and configure as expected. I don't know if it's a bug of the configuration manager which try to import necessary default configuration files even if they are in optional.

1 Answer 1


My problem is a bug of the configuration system. An issue exists for this exact problem: https://www.drupal.org/project/drupal/issues/2922417

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.