Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 291349

Potential dataloss when opting in to "Avoid field storage write when field content did not change" and changing the bundle type of an existing entity

$
0
0

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:

  1. Create an entity A of bundle1
  2. Create a bundle of type bundle2 (All fields matching bundle1)
  3. Change entity to a type of bundle2
  4. Delete bundle1
  5. 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?

Release notes snippet


Viewing all articles
Browse latest Browse all 291349

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>