Skip to content
Snippets Groups Projects
Commit 93172912 authored by Dries Buytaert's avatar Dries Buytaert
Browse files

- Patch #37926 by asimmonds/chx: fixed previewing nodes.

parent 6a7e45d0
Branches
Tags
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
......@@ -1670,7 +1670,9 @@ function node_form($node) {
}
function node_form_add_preview($form_id, $form, $edit) {
$form['node_preview'] = array('#value' => node_preview(node_validate($edit)), '#weight' => -100);
$edit = array2object($edit);
node_validate($edit);
$form['node_preview'] = array('#value' => node_preview($edit), '#weight' => -100);
return $form;
}
......
......@@ -1670,7 +1670,9 @@ function node_form($node) {
}
function node_form_add_preview($form_id, $form, $edit) {
$form['node_preview'] = array('#value' => node_preview(node_validate($edit)), '#weight' => -100);
$edit = array2object($edit);
node_validate($edit);
$form['node_preview'] = array('#value' => node_preview($edit), '#weight' => -100);
return $form;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment