0

I don't understand what is missing. It's just a simple blogpost content type that I created before I reset the db and tried to re-import it. All the modules requires are enabled and I did try to clear the cache. Run updb Tried drush cim --partial. nothing has worked. This is the error:

Import the listed configuration changes? (y/n): y
Drupal\Core\Config\ConfigImporterException: There were errors validating the config synchronization.                                                         [error]
Configuration <em class="placeholder">field.field.node.blog_post.field_post_category</em> depends on the <em
class="placeholder">field.storage.node.field_post_category</em> configuration that will not exist after import.
Configuration <em class="placeholder">field.field.node.blog_post.field_post_featured_images</em> depends on the <em
class="placeholder">field.storage.node.field_post_featured_images</em> configuration that will not exist after import.
Configuration <em class="placeholder">field.field.node.blog_post.field_post_video</em> depends on the <em
class="placeholder">field.storage.node.field_post_video</em> configuration that will not exist after import. in Drupal\Core\Config\ConfigImporter->validate()
(line 737 of /var/www/localvolumes/html/core/lib/Drupal/Core/Config/ConfigImporter.php).
The import failed due for the following reasons:                                                                                                             [error]
Configuration <em class="placeholder">field.field.node.blog_post.field_post_category</em> depends on the <em
class="placeholder">field.storage.node.field_post_category</em> configuration that will not exist after import.
Configuration <em class="placeholder">field.field.node.blog_post.field_post_featured_images</em> depends on the <em
class="placeholder">field.storage.node.field_post_featured_images</em> configuration that will not exist after import.
Configuration <em class="placeholder">field.field.node.blog_post.field_post_video</em> depends on the <em
class="placeholder">field.storage.node.field_post_video</em> configuration that will not exist after import.
  • It's not vague at all. The errors shown is not about missing modules, but about missing configuration. Obviously, the field (instance) config files you try to install are missing their field storage information, which is always stored in another config file with the pattern field.storage.[entity_type].[field_name].yml. – Mario Steinitz Mar 1 at 12:01
0

Answering my own question, hoping it may help others. The error message above, in my case, indicates a missing configuration file.

My workflow usually involves switching between branches and re-setting the database to its pristine state. Then I try to import the configuration before finishing a piece of work.

It turns out I did not commit some field.storage.* configuration files before I switched branches and re-set the database. Then the import failed and complained about missing configuration. Re-reading the error messages more carefully allowed me to understand the underlying issue.

I used my IDE (phpstorm) local history feature to search for the missing files and restore them. This fixed the issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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