Problem/Motivation
After upgrading from beta2 to beta3 and running drush updb
and drush cex
and then diffing the changes, while most of the diffs were expected (removing the datalayer
module dependency and associated third_party_settings
), a couple stood out as "where did this come from?", to wit:
diff --git a/config/sync/field.field.node.blog.field_kc_section.yml b/config/sync/field.field.node.blog.field_kc_section.yml
index f470eaad..156d7414 100644
--- a/config/sync/field.field.node.blog.field_kc_section.yml
+++ b/config/sync/field.field.node.blog.field_kc_section.yml
@@ -6,8 +6,6 @@ dependencies:
- field.storage.node.field_kc_section
- node.type.blog
- taxonomy.vocabulary.kc_section
- content:
- - 'taxonomy_term:kc_section:37682848-1c9e-4f06-9485-ab427fc1fe59'
id: node.blog.field_kc_section
field_name: field_kc_section
entity_type: node
diff --git a/config/sync/field.field.node.directory.field_address.yml b/config/sync/field.field.node.directory.field_address.yml
index 55bfa8f9..2c8ab77d 100644
--- a/config/sync/field.field.node.directory.field_address.yml
+++ b/config/sync/field.field.node.directory.field_address.yml
@@ -20,6 +20,7 @@ default_value_callback: ''
settings:
available_countries: { }
langcode_override: ''
+ field_overrides: { }
fields:
administrativeArea: administrativeArea
locality: locality
After some narrowing down of other potential variables, I figured out that if I edited datalayer_update_8001()
to add an if (!empty($settings))
wrapping the foreach ($settings ...)
and $field->save()
parts, these 2 diffs wouldn't get exported; inversely, only those 2 get exported if I wrapped it in if (empty($settings))
(I reset git and the DB each time, to be sure).
I have no idea why those 2 field.field.*
ymls (out of 100+ more that also never make mention of datalayer
) are affected by this. Nor why save()
is making those diffs and not some additional ones. Because when I tested going to their respective UI pages and just hitting "Save" and running drush cex
(to check if it was just a matter of the .yml being a bit behind database), it exports yet further diffs, but whether I do that before or after running 8001, none of those diffs seem related to datalayer.
Steps to reproduce
Proposed resolution
Maybe wrap the code following the $settings
definition in if (!empty($settings))
as mentioned above (so anybody who hasn't yet updated won't share my confusion).
Or maybe this is less bug-report and more support-request, and I either need (a) reassurance that I can safely discard those two diffs or (b) informing that, no, those diffs are somehow relevant and I should definitely be committing them along w/ the others resulting from 8001. Thanks. (ETA: I may need to commit them anyway, because short of creating a patch, drush deploy
will make the DB change anyway, and subsequent cim
s may refuse to stick.)
Remaining tasks
User interface changes
API changes
Data model changes