Problem/Motivation

When I exported the configuration from the module, two files were generated:

  • entity_reference_preview.settings.yml
  • view.settings.yml

When that configuration is imported into a clean install of Drupal 9, I get a configuration import error

Configuration <em class="placeholder">view.settings</em> depends on the <em class="placeholder">view</em> extension that will not be installed after import. in Drupal\Core\Config\ConfigImporter->validate() (line 748 of /mnt/tmp/local.prod/source/docroot/core/lib/Drupal/Core/Config/ConfigImporter.php). 

I have a feeling the issue is in entity_reference_preview.install which adds the configuration key in hook_install and removes it in hook_uninstall. Shouldn't it be views.settings?

Steps to reproduce

  1. Install Drupal using Standard installation profile
  2. Add and enable the entity_reference_preview 1.0.3 module
  3. Export the configuration for the site (I used drush cex)
  4. Reinstall Drupal using the Standard installation profile
  5. Import configuration exported above (I used drush cim)

Proposed resolution

Change lines 15 and 27 in entity_reference_preview.install to use "views.settings" instead of "view.settings"?

Remaining tasks

Patch and tests

User interface changes

None

API changes

None

Data model changes

None?

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

greggmarshall created an issue. See original summary.

e0ipso’s picture

This was a big oversight. Sorry it took so long to get to this.

e0ipso’s picture

Status: Active » Reviewed & tested by the community
e0ipso’s picture

Title: Wrong Configuration Export? » Wrong Configuration Export

e0ipso’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.