Change record status: 
Project: 
Introduced in branch: 
8.x
Introduced in version: 
8.0.0-beta15
Description: 

Due to a mismatch between how empty string values were stored, in earlier versions of Drupal 8 it was possible to save an empty field value and not be able to delete it afterwards from the UI.

Anything extended from StringItemBase now inherits a default isEmpty() implementation:

  public function isEmpty() {
    $value = $this->get('value')->getValue();
    return $value === NULL || $value === '';
  }

If this does not match what you need—for example, PasswordItem—you can override this in your sub-class:

public function isEmpty() {
   // We cannot use the parent implementation from StringItem as it does not
   // consider the additional 'existing' property that PasswordItem contains.
  $value = $this->get('value')->getValue();
  $existing = $this->get('existing')->getValue();
  return $value === NULL && $existing === NULL;
}

Additionally, all downstream code that is creating an entity will need to provide required field values, because these will no longer default to empty string:

  $node = entity_create('node', array(
    'type' => 'story',
    'nid' => 2,
    'vid' => 12,
    'revision_log' => '',
+  'title' => $this->randomString(), # newly required field.
    ));
Impacts: 
Module developers
Updates Done (doc team, etc.)
Online documentation: 
Not done
Theming guide: 
Not done
Module developer documentation: 
Not done
Examples project: 
Not done
Coder Review: 
Not done
Coder Upgrade: 
Not done
Other: 
Other updates done