Skip to content
Snippets Groups Projects
Commit 96fd5176 authored by catch's avatar catch
Browse files

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

parent cf0a25f6
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -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;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment