The configuration import doesn't work for both full archive and single item import
Even a Content-type cannot be imported, returns with validation error (single item import)

Error:
The configuration cannot be imported because it failed validation for the following reasons:
Configuration mailsystem.settings depends on the mailsystem extension that will not be installed after import.
Configuration swiftmailer.message depends on the swiftmailer extension that will not be installed after import.
Configuration swiftmailer.transport depends on the swiftmailer extension that will not be installed after import.

Content-Type - Import:
uuid: 56ef2068-8b7c-4b56-b4cd-2c1748b6d0bc
langcode: en
status: true
dependencies:
module:
- menu_ui
third_party_settings:
menu_ui:
available_menus:
- main
parent: 'main:'
name: test
type: test
description: tset
help: ''
new_revision: true
preview_mode: 1
display_submitted: true

Possible solution

See also How to fix "The following module is missing from the file system..." warning messages documentation page for this problem, which sometimes happen after upgrading Drupal, because some modules were not uninstalled completely.

CommentFileSizeAuthor
#3 core.extension.yml33 bytesMohan6695
screenshot.png30.71 KBMohan6695

Issue fork drupal-3144341

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

Mohan6695 created an issue. See original summary.

catch’s picture

Category: Bug report » Support request
Priority: Critical » Normal

You need to ensue that swiftmailer and mailsystem modules are installed in your config export - take a look at core.extension.yml

Mohan6695’s picture

StatusFileSize
new33 bytes

I have checked it already, swiftmailer and mailsystem modules were not installed.
Attached my core.extension.yml file and also checked with config_export table. I don't see swiftmailer and mailsystem modules in that.

catch’s picture

@Mohan6695 this is the problem with your config export. You either need to delete mailsystem.settings.yml, swiftmailer.message.yml and swiftmailer.transport.yml or enable those two modules - but you can't sync config for modules that aren't installed on your system.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

challeypeng’s picture

You just need to delete these configurations.
drush config-delete mailsystem.settings
drush config-delete swiftmailer.message
drush config-delete swiftmailer.transport

OK

It works for me in other similar situations。

Best wishes!

quietone’s picture

Status: Active » Postponed (maintainer needs more info)

@Mohan6695, Is this still a problem? If you have resolved this what did you do?

rossidrup’s picture

I get these errors in d9.2

The configuration cannot be imported because it failed validation for the following reasons:
Configuration block.block.addtoanybuttons depends on the radiestezija_adaptive_theme theme that will not be installed after import.
Configuration block.block.animacija depends on the radiestezija_adaptive_theme theme that will not be installed after import.
Configuration block.block.bootstrap_barrio_addtoanybuttons depends on the bootstrap_barrio theme that will not be installed after import.
Configuration block.block.bootstrap_barrio_animacija depends on the bootstrap_barrio theme that will not be installed after import.
Configuration block.block.bootstrap_barrio_branding depends on the bootstrap_barrio theme that will not be installed after import.
Configuration block.block.bootstrap_barrio_breadcrumbs depends on the bootstrap_barrio theme that will not be installed after import.
Configuration block.block.bootstrap_barrio_content depends on the bootstrap_barrio theme that will not be installed after import.
Configuration block.block.bootstrap_barrio_footer depends on the bootstrap_barrio theme that will not be installed after import.
Configuration block.block.bootstrap_barrio_footer_2 depends on the bootstrap_barrio theme that will not be installed after import.
Configuration block.block.bootstrap_barrio_help depends on the bootstrap_barrio theme that will not be installed after import.
Configuration block.block.bootstrap_barrio_kajuporabljamozameritev depends on the bootstrap_barrio theme that will not be installed after import.
Configuration block.block.bootstrap_barrio_local_actions depends on the bootstrap_barrio theme that will not be installed after import.
Configuration block.block.bootstrap_barrio_local_tasks depends on the bootstrap_barrio theme that will not be installed after import.
Configuration block.block.bootstrap_barrio_logo depends on the bootstrap_barrio theme that will not be installed after import.
Configuration block.block.bootstrap_barrio_main_menu depends on the bootstrap_barrio theme that will not be installed after import.
Configuration block.block.bootstrap_barrio_messages depends on the bootstrap_barrio theme that will not be installed after import.
Configuration block.block.bootstrap_barrio_newsletterform depends on the bootstrap_barrio theme that will not be installed after import.
Configuration block.block.bootstrap_barrio_page_title depends on the bootstrap_barrio theme that will not be installed after import.
Configuration block.block.bootstrap_barrio_phone depends on the bootstrap_barrio theme that will not be installed after import.
Configuration block.block.bootstrap_barrio_search depends on the bootstrap_barrio theme that will not be installed after import.
Configuration block.block.bootstrap_barrio_socialbookmarks depends on the bootstrap_barrio theme that will not be installed after import.
Configuration block.block.bootstrap_barrio_socialmediaicons depends on the bootstrap_barrio theme that will not be installed after import.
Configuration block.block.bootstrap_barrio_subtheme_addtoanybuttons depends on the bootstrap_barrio_subtheme theme that will not be installed after import.
Configuration block.block.bootstrap_barrio_subtheme_animacija depends on the bootstrap_barrio_subtheme theme that will not be installed after import.
Configuration block.block.bootstrap_barrio_subtheme_branding depends on the bootstrap_barrio_subtheme theme that will not be installed after import.
Configuration block.block.bootstrap_barrio_subtheme_breadcrumbs depends on the bootstrap_barrio_subtheme theme that will not be installed after import.
Configuration block.block.bootstrap_barrio_subtheme_content depends on the bootstrap_barrio_subtheme theme that will not be installed after import.
Configuration block.block.bootstrap_barrio_subtheme_footer depends on the bootstrap_barrio_subtheme theme that will not be installed after import.
Configuration block.block.bootstrap_barrio_subtheme_footer_2 depends on the bootstrap_barrio_subtheme theme that will not be installed after import.
Configuration block.block.bootstrap_barrio_subtheme_help depends on the bootstrap_barrio_subtheme theme that will not be installed after import.
Configuration block.block.bootstrap_barrio_subtheme_kajuporabljamozameritev depends on the bootstrap_barrio_subtheme theme that will not be installed after import.
Configuration block.block.bootstrap_barrio_subtheme_local_actions depends on the bootstrap_barrio_subtheme theme that will not be installed after import.
Configuration block.block.bootstrap_barrio_subtheme_local_tasks depends on the bootstrap_barrio_subtheme theme that will not be installed after import.
Configuration block.block.bootstrap_barrio_subtheme_logo depends on the bootstrap_barrio_subtheme theme that will not be installed after import.
Configuration block.block.bootstrap_barrio_subtheme_main_menu depends on the bootstrap_barrio_subtheme theme that will not be installed after import.
Configuration block.block.bootstrap_barrio_subtheme_messages depends on the bootstrap_barrio_subtheme theme that will not be installed after import.
Configuration block.block.bootstrap_barrio_subtheme_newsletterform depends on the bootstrap_barrio_subtheme theme that will not be installed after import.
Configuration block.block.bootstrap_barrio_subtheme_page_title depends on the bootstrap_barrio_subtheme theme that will not be installed after import.
Configuration block.block.bootstrap_barrio_subtheme_phone depends on the bootstrap_barrio_subtheme theme that will not be installed after import.
Configuration block.block.bootstrap_barrio_subtheme_search depends on the bootstrap_barrio_subtheme theme that will not be installed after import.
Configuration block.block.bootstrap_barrio_subtheme_socialbookmarks depends on the bootstrap_barrio_subtheme theme that will not be installed after import.
Configuration block.block.bootstrap_barrio_subtheme_socialmediaicons depends on the bootstrap_barrio_subtheme theme that will not be installed after import.
Configuration block.block.bootstrap_barrio_subtheme_views_block__content_recent_block_1 depends on the bootstrap_barrio_subtheme theme that will not be installed after import.
Configuration block.block.bootstrap_barrio_subtheme_zakajizbratinas depends on the bootstrap_barrio_subtheme theme that will not be installed after import.
Configuration block.block.bootstrap_barrio_views_block__content_recent_block_1 depends on the bootstrap_barrio theme that will not be installed after import.
Configuration block.block.bootstrap_barrio_zakajizbratinas depends on the bootstrap_barrio theme that will not be installed after import.
Configuration block.block.footer depends on the showcase_lite theme that will not be installed after import.
Configuration block.block.footer_2 depends on the radiestezija_adaptive_theme theme that will not be installed after import.
Configuration block.block.kajuporabljamozameritev depends on the radiestezija_adaptive_theme theme that will not be installed after import.
Configuration block.block.logo depends on the radiestezija_adaptive_theme theme that will not be installed after import.
Configuration block.block.newsletterform depends on the radiestezija_adaptive_theme theme that will not be installed after import.
Configuration block.block.phone depends on the radiestezija_adaptive_theme theme that will not be installed after import.
Configuration block.block.primaryadminactions depends on the showcase_lite theme that will not be installed after import.
Configuration block.block.radiestezija_adaptive_theme_branding depends on the radiestezija_adaptive_theme theme that will not be installed after import.
Configuration block.block.radiestezija_adaptive_theme_breadcrumbs depends on the radiestezija_adaptive_theme theme that will not be installed after import.
Configuration block.block.radiestezija_adaptive_theme_content depends on the radiestezija_adaptive_theme theme that will not be installed after import.
Configuration block.block.radiestezija_adaptive_theme_footer depends on the radiestezija_adaptive_theme theme that will not be installed after import.
Configuration block.block.radiestezija_adaptive_theme_help depends on the radiestezija_adaptive_theme theme that will not be installed after import.
Configuration block.block.radiestezija_adaptive_theme_local_actions depends on the radiestezija_adaptive_theme theme that will not be installed after import.
Configuration block.block.radiestezija_adaptive_theme_local_tasks depends on the radiestezija_adaptive_theme theme that will not be installed after import.
Configuration block.block.radiestezija_adaptive_theme_main_menu depends on the radiestezija_adaptive_theme theme that will not be installed after import.
Configuration block.block.radiestezija_adaptive_theme_messages depends on the radiestezija_adaptive_theme theme that will not be installed after import.
Configuration block.block.radiestezija_adaptive_theme_page_title depends on the radiestezija_adaptive_theme theme that will not be installed after import.
Configuration block.block.radiestezija_adaptive_theme_search depends on the radiestezija_adaptive_theme theme that will not be installed after import.
Configuration block.block.showcase_lite_branding depends on the showcase_lite theme that will not be installed after import.
Configuration block.block.showcase_lite_breadcrumbs depends on the showcase_lite theme that will not be installed after import.
Configuration block.block.showcase_lite_content depends on the showcase_lite theme that will not be installed after import.
Configuration block.block.showcase_lite_help depends on the showcase_lite theme that will not be installed after import.
Configuration block.block.showcase_lite_main_menu depends on the showcase_lite theme that will not be installed after import.
Configuration block.block.showcase_lite_messages depends on the showcase_lite theme that will not be installed after import.
Configuration block.block.showcase_lite_page_title depends on the showcase_lite theme that will not be installed after import.
Configuration block.block.showcase_lite_powered depends on the showcase_lite theme that will not be installed after import.
Configuration block.block.showcase_lite_search depends on the showcase_lite theme that will not be installed after import.
Configuration block.block.socialbookmarks depends on the radiestezija_adaptive_theme theme that will not be installed after import.
Configuration block.block.socialmediaicons depends on the radiestezija_adaptive_theme theme that will not be installed after import.
Configuration block.block.system depends on the garland theme that will not be installed after import.
Configuration block.block.system_1 depends on the blueprint theme that will not be installed after import.
Configuration block.block.system_2 depends on the bluemarine theme that will not be installed after import.
Configuration block.block.system_3 depends on the chameleon theme that will not be installed after import.
Configuration block.block.tabs depends on the showcase_lite theme that will not be installed after import.
Configuration block.block.tools depends on the showcase_lite theme that will not be installed after import.
Configuration block.block.user depends on the garland theme that will not be installed after import.
Configuration block.block.useraccountmenu depends on the showcase_lite theme that will not be installed after import.
Configuration block.block.user_1 depends on the garland theme that will not be installed after import.
Configuration block.block.user_10 depends on the fusion_core theme that will not be installed after import.
Configuration block.block.user_11 depends on the fusion_core theme that will not be installed after import.
Configuration block.block.user_2 depends on the blueprint theme that will not be installed after import.
Configuration block.block.user_3 depends on the blueprint theme that will not be installed after import.
Configuration block.block.user_4 depends on the bluemarine theme that will not be installed after import.
Configuration block.block.user_5 depends on the bluemarine theme that will not be installed after import.
Configuration block.block.user_6 depends on the chameleon theme that will not be installed after import.
Configuration block.block.user_7 depends on the chameleon theme that will not be installed after import.
Configuration block.block.user_8 depends on the fusion_starter theme that will not be installed after import.
Configuration block.block.user_9 depends on the fusion_starter theme that will not be installed after import.
Configuration block.block.views_block__content_recent_block_1 depends on the radiestezija_adaptive_theme theme that will not be installed after import.
Configuration block.block.zakajizbratinas depends on the radiestezija_adaptive_theme theme that will not be installed after import.
Configuration bootstrap_barrio.settings depends on the bootstrap_barrio extension that will not be installed after import.
Configuration bootstrap_barrio_subtheme.settings depends on the bootstrap_barrio_subtheme extension that will not be installed after import.
Configuration core.entity_form_display.node.story.default depends on the Imce File Manager module that will not be installed after import.
Configuration imce.profile.admin depends on the Imce File Manager module that will not be installed after import.
Configuration imce.profile.member depends on the Imce File Manager module that will not be installed after import.
Configuration imce.settings depends on the Imce File Manager module that will not be installed after import.
Configuration radiestezija_adaptive_theme.settings depends on the radiestezija_adaptive_theme extension that will not be installed after import.
Configuration showcase_lite.settings depends on the showcase_lite extension that will not be installed after import.

Tyheman made their first commit to this issue’s fork.

Tyheman’s picture

drush cdel CONFIGURATION_NAME

Example: drush cdel mailsystem.settings

Be sure the theme or module is outdated before you run these commands! I was able to remove all of my errors by removing these old dependencies.

cilefen’s picture

Status: Postponed (maintainer needs more info) » Closed (outdated)
rajesh.vishwakarma’s picture

#6 worked for me. Thnaks

gung wang’s picture

I got similar issues when to import config:

- Error about three blocks depends on 2 custom modules
- Three custom blocks are:
-- 'block.block.solosegmentsearchblock',
-- 'block.block.header_search_block',
-- 'block.block.ul_com_theme_header_search_block'

My solution is run the drush command:

drush sql:query  "DELETE FROM config WHERE name IN ('block.block.solosegmentsearchblock', 'block.block.header_search_block', 'block.block.ul_com_theme_header_search_block')"

My platform: Drupal 9 and Drush 10

gung wang’s picture

I got similar issues when to import config:

- Error about three blocks depends on 2 custom modules
- Three custom blocks are:
-- 'block.block.solosegmentsearchblock',
-- 'block.block.header_search_block',
-- 'block.block.ul_com_theme_header_search_block'

My solution is run the drush command:

drush sql:query  "DELETE FROM config WHERE name IN ('block.block.solosegmentsearchblock', 'block.block.header_search_block', 'block.block.ul_com_theme_header_search_block')"

My platform: Drupal 9 and Drush 10

somebodysysop’s picture

Just a note after a recent bad experience. Bad, bad, bad idea to run something like drush sql:query "DELETE FROM config WHERE name IN ('core.entity_view_display.paragraph.nested.default')" on anything unless you are absolutely sure, sure, sure you don't need the config.

I just did this in order to get a view imported, and ended up removing the configuration that opens my accordion paragraphs. Had to restore backup to get it back.

Which leads me to the next question: Is there another general workaround for this problem other than deleting configurations?:

Configuration mailsystem.settings depends on the mailsystem extension that will not be installed after import.

pipicom’s picture

#6 works for me as well!

somebodysysop’s picture

#6 works for me as well!

#6 worked for me as well. The problem is that it created an entirely new problem by deleting the configuration. Fortunately I was able to copy the configuration from a duplicate site. But, we really need another solution to this problem.

adpo’s picture

I have the same problem, where I need to delete configuration from my three custom modules like

Configuration admin_quotation_settings.settings depends on the admin_quotation_settings extension that will not be installed after import

I would like to know avoid this situation in future. Why does it happen, how to remove the dependency?

What is the reason for this error?

somebodysysop’s picture

This is how I resolved my issue: https://www.drupal.org/project/drupal/issues/3335049#comment-14881197

Essentially, a configuration exists in the source site that does not exist in the destination site(s). So, the strategy, other than deleting the configurations in the destination site config table, is to make sure the configuration in question is duplicated in the source site.

I do not know what the issue is with "admin_quotation_settings", but if it's in a module that's enabled in the source but not the destination, you can easily fix the problem by enabling that module in the destination.

If, as in my case, the configurations on both the source and destination sites are exactly the same, then you can try what I did: Go to the settings page for that configuration on the destination site, and simply re-save it. I know, simple. But it worked for me.

samhaldia’s picture

Deleting those configs works

naveen20430’s picture

Have Same issue

entropea’s picture

Having same issue in 9.5. Modules don't list these dependencies and are in the extensions.yml. Could this be a config split issue?

alfthecat’s picture

I exported a view as a single item, and after deleting and re-creating a field that is included in the view (same machine name) I try to run the import, all on the same site. Validation fails and it won't let me import, stating: "Configuration update.settings depends on the Update Manager module that will not be installed after import."

I don't understand how Update Manager is a dependency of a view, and there is no reference to it in the view export code either. It wasn't installed when I exported and isn't installed when I attempt to import either. Very strange behavior, I don't have config split installed. Drupal 10.2.3.

ressa’s picture

Issue summary: View changes
tolstoydotcom’s picture

For a personal D10 site, I created a new view in my local version that I tried to import into the live site. I got this message: "Configuration block.block.workflowtransitionform depends on the theme that will not be installed after import."

I exported that config and it had this:

...
dependencies:
  module:
    - workflow
  theme:
    - null
id: workflowtransitionform
theme: null
...

I replaced both instances of "null" with "claro", imported that config on admin/config/development/configuration/single/import, and then I was able to import the view.

I have no idea where "null" came from, but if this is a common problem for a lot of people it might be easiest to create a "config repair" contrib module that would look for and fix such things.