Problem/Motivation
I add some bundle specific fields via hook_entity_bundle_field_info
as should be controlled in code rather than config, but the entity type belongs to another module. However, although the tables are correctly created, the entity.definitions.bundle_field_map
state key is never updated with the new fields. This means any future calls to \Drupal\Core\Entity\EntityFieldManager::getFieldMap
are unaware of the field (despite it existing).
I think the two scenarios this causes problems are:
- Module install for existing bundles
- Bundle creation
I expect there is also going to be the reverse issue on module/bundle uninstall (bundle install may not matter too much).
Proposed resolution
TBD
Remaining tasks
TBD
User interface changes
None.
API changes
TBD
Data model changes
Probably none.