When a field config entity is deleted it deletes the config file and moves the configuration into the state
field.field.deleted - see
Field::preDelete(). This is also true for field instances - state
FieldInstance::preDelete(). This actually breaks dependency management since the data in those fields actually depends on the configuration entity existing. We then do all sorts of hacks in order to load the deleted field and purge the items - see
field_purge_batch(). At the moment field/field instance data purging occurs during cron.
This causes massive issues foras we need to be able to clean up fields sanely on module uninstall.
- Enforce data removal before deleting field instances.
- Ensure all field instances can be deleted before deleting fields.
- Agree approach
- Write patch
User interface changes
Yes. Deleting a field instance should start a batch that deletes all the data.