- πΊπΈUnited States smustgrave
Titles seem off but this seems like a duplicate of π Fatal error when updating entity reference field storage config, after removing target entity type class from codebase Postponed: needs info
If you change the target type of an entity reference field, Drupal does not detect this as a field definition update, because the schema is identical before and after the change. Thus, it's easy to forget to call EntityDefinitionUpdateManager::updateFieldStorageDefinitions()
as part of the update hook, because e.g. drush entity-updates
does not report it. In particular if you are not providing an update path for custom modules but instead relying solely on drush entity-updates
(which is valid if you know the exact code and database state of all your environments) this can lead to problems.
Since the field storage definition will not be updated the old entity type ID will still be referenced, even if the old entity type is uninstalled after the change. This will then lead to fatal errors where the last installed field storage definitions are used.
It seems like we should provide field item classes the possibility to participate in the decision whether or not they need storage schema changes, i.e. delegate from SqlContentEntityStorageSchema::requiresFieldStorageSchemaChanges()
somehow.
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Titles seem off but this seems like a duplicate of π Fatal error when updating entity reference field storage config, after removing target entity type class from codebase Postponed: needs info