Skip to content
Snippets Groups Projects
Commit 00c87254 authored by Gábor Hojtsy's avatar Gábor Hojtsy
Browse files

#89376 by Eaton: add the preview build mode flag prior to hook_form() being called

parent 1800ea94
Branches 2.x
Tags 2.1.0
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
...@@ -104,6 +104,9 @@ function node_form(&$form_state, $node) { ...@@ -104,6 +104,9 @@ function node_form(&$form_state, $node) {
if (!isset($form_state['node_preview'])) { if (!isset($form_state['node_preview'])) {
node_object_prepare($node); node_object_prepare($node);
} }
else {
$node->build_mode = NODE_BUILD_PREVIEW;
}
// Set the id of the top-level form tag // Set the id of the top-level form tag
$form['#id'] = 'node-form'; $form['#id'] = 'node-form';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment