Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Problem/Motivation
If you uninstall migrate_drupal and re-enable it, you get
exception 'Drupal\Core\Config\PreExistingConfigException' with message 'Configuration objects (migrate.migration.d6_action_settings, migrate.migration.d6_aggregator_feed,
migrate.migration.d6_aggregator_item, migrate.migration.d6_aggregator_settings, migrate.migration.d6_block, ...)
This is because the default configuration is not automatically deleted on uninstall.
Proposed resolution
Add an explicit dependency on the migrate_drupal module to each migration's .yml file.
Remaining tasks
Do it.
User interface changes
N/A
API changes
N/A
Comment | File | Size | Author |
---|---|---|---|
#6 | interdiff-1-6.txt | 446 bytes | anavarre |
#6 | 2459619-6.patch | 47.68 KB | anavarre |
#1 | 2459619-1.patch | 47.7 KB | anavarre |
Comments
Comment #1
anavarreI didn't experience that behavior in my testing. However, I think this patch is a start to address what we need here.
Comment #2
mikeryanAlmost exactly the same patch I made last night - but it doesn't work, uninstalling migrate_drupal leaves the configuration. Looking in the config table, the data contains s:12:"dependencies";a:0:{}. By comparison, enabling the aggregator module, which contains core.entity_view_display.aggregator_feed.aggregator_feed.default.yml, results in a config containing s:12:"dependencies";a:1:{s:6:"module";a:1:{i:0;s:10:"aggregator";}} and it does get uninstalled properly.
So, probably something funky in the Migration config entity is preventing dependencies from being properly saved? I've done some poking around but I'm at a loss...
Comment #3
anavarreSomething funky indeed:
At first glance it looks like a different, more involved issue than this one. Still seems we should add those dependencies anyway, right?
Comment #4
mikeryanAdded child issue #2460301: Migration config entities don't store dependencies.
Comment #5
mikeryanPlease merge with the existing (file) dependency.
Comment #6
anavarreThanks, I had missed it.
Comment #7
mikeryanPer https://www.drupal.org/node/2404447, it appears the dependencies need to be "enforced" (i.e., there's an additional "enforced" key between "dependencies" and "module".
However, there's a broader issue at #2460529: Migrations need to use the configuration entity dependency system which might supersede this one. Postponing for now...
Comment #8
alexpottRe #7 good call #2460301: Migration config entities don't store dependencies should supersede this one,
Comment #9
mikeryanYes, the current patch in #2460529: Migrations need to use the configuration entity dependency system fixes this.