Closed (outdated)
Project:
Drupal core
Version:
8.9.x-dev
Component:
field system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
31 Aug 2013 at 16:47 UTC
Updated:
27 Dec 2020 at 05:14 UTC
Jump to comment: Most recent
Comments
Comment #1
jibranTagging.
Comment #2
swentel commentedI understand the idea, but I'm wondering whether it's a good one.
It's perfectly possible to delete instance(s) manually, then disable (and uninstall) a module which provides the entity type that field instance is connected to. That field data will never be purged because field_read_instances() ignores instances of which the entity type is unknown. So running cron is not going to help, and the only way to inform the user is to print the machine name of the entity type which we need to be available. Other than that, we basically have nothing.
Another sweet example is the forum module. The 'taxonomy_forums' field is deleted in forum_uninstall. Even though field_purge_batch is called in the uninstall hook, there's no guarantee all data will be gone and next cron requests will not be able to clean that up.
I'm pretty sure we have dozens of D7 installations out there in the world with stale deleted fields data that is never cleaned up because of those two use cases.
IMO, this will make the upgrade path even more tedious then it already will be anyway. Not sure how to clean that up either though ...
Comment #3
catchI didn't realise this, we can stop that from happening with the module/config uninstall issue, but can't fix it retrospectively.
If the fields are still in field config somewhere as deleted, and there's no way to purge them, could we maybe remove the field from config too at some point during the upgrade path? Then there's field tables left in the system, but no other record of the field at all - so worst case they get cleared out manually when they're spotted?
I'm also fine marking this won't fix if it makes things harder rather than easier.
Comment #4
yched commentedThe core uprgade is not an ideal time to decide whether a field is orphaned without its field type module - at least so far, with the current recommendation of "disable all contrib modules before upgrading core".
Comment #5
catchThat's not going to be an allowed workflow for 8.x once #1199946: Disabled modules are broken beyond repair so the "disable" functionality needs to be removed is in - you'll be required to decide whether to enable or uninstall before upgrading. I'm assuming that patch is committed in any of these discussions..
Comment #6
yched commentedSure - still, what about a site upgrading to D8 without all its D7 contrib modules available at that time ?
Comment #7
roam2345 commentedDoes this issue even make sense any longer as i understand that the upgrade path from D7 -> D8 now requires a fresh install and use of the migrate module.. hence that mapping of these old tables you are speaking about would simply just not happen.
Comment #16
quietone commentedYes, as lathan says, the migration system only migrates fields that are not deleted. There doesn't seem to be anything to do here. Closing as outdated.