- 🇦🇺Australia acbramley
Is this reproducible on 11.x? If so, can you please provide code snippets?
It definitely works with node bundles, we use the alter hook extensively on client projects.
Method \Drupal\Core\Entity\EntityDefinitionUpdateManager::getChangeList always marks bundle fields added in code as 'needs to be deleted'
Create a custom entity type, define a field with method bundleFieldDefinitions in the entity class. If you open page /admin/reports/status it says that the field you defined needs to be deleted.
TODO Try to reproduce with hook_entity_bundle_field_info and bundle of node
Not sure about the proper solution, Drupal guru may suggest smth better. I see next ways
1. \Drupal\Core\Entity\EntityFieldManager::getFieldStorageDefinitions has to include bundle fields in their result. In this case we have to review all usages of the method (there are a lot of them) to make sure it won't break other functionalities
2. Update method \Drupal\Core\Entity\EntityDefinitionUpdateManager::getChangeList so, that it gets base field storage definitions and bundle field storage definitions and only after that compares it with installed field storage definitions.
1. Choose a way to fix it
2. Create patch
Postponed: needs info
11.0 🔥
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Is this reproducible on 11.x? If so, can you please provide code snippets?
It definitely works with node bundles, we use the alter hook extensively on client projects.