Commit 96fd5176 authored by catch's avatar catch
Browse files

Issue #1880922 by yched: Remnants of entity_view_prepared() flag.

parent cf0a25f6
......@@ -399,18 +399,4 @@ public function delete(array $form, array &$form_state) {
$form_state['redirect'] = array('node/' . $node->nid . '/delete', array('query' => $destination));
}
/**
* Overrides \Drupal\Core\Entity\EntityFormController::buildEntity().
*/
public function buildEntity(array $form, array &$form_state) {
$node = parent::buildEntity($form, $form_state);
// If the node went through 'Preview', it got stored back in $form_state
// with values out of the 'prepare_view' steps, and with the
// entity_view_prepared flag set. Since buildEntity() resets the values to
// those in the form submission, the entity_view_prepared flag needs to be
// reset too so that the next 'Preview' can work on a consistent $node.
unset($node->entity_view_prepared);
return $node;
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment