Problem/Motivation
The change as documented in Avoid field storage write when field content did not change As it stands, if you change the bundle of an entity, this change is not detected by this code. This will only raise it's head when the entities' old bundle type is deleted, as Drupal cleans up old field values, you will have data loss.
I have set it to major due to the possibility of permanent data loss.
Steps to reproduce
In short, you will have data loss if you opt in to the above behaviour in the following scenario:
- Create an entity A of bundle1
- Create a bundle of type bundle2 (All fields matching bundle1)
- Change entity to a type of bundle2
- Delete bundle1
- Observe data loss on the fields of entity A
Proposed resolution
Check whether the entity type has changed when saving the field values. Patch shall be attached shortly.
Remaining tasks
User interface changes
N/A
API changes
N/A
Data model changes
N/A?