预览仅适用于保存之前的新节点,但在保存节点后,编辑并单击预览:
预览剪裁&预览完整版都会显示上次保存的状态。
有任何建议我如何检查可能会阻止它或它是否正确设置?
FYI /modules/node/node.pages.inc:
function theme_node_preview($variables) {
$node = $variables['node'];
$output = '<div class="preview">';
$preview_trimmed_version = FALSE;
$elements = node_view(clone $node, 'teaser');
$trimmed = drupal_render($elements);
$elements = node_view($node, 'full');
$full = drupal_render($elements);
...
$enter code hereform['actions']['preview'] = array(
'#access' => variable_get('node_preview_' . $node->type, DRUPAL_OPTIONAL) != DRUPAL_DISABLED,
'#type' => 'submit',
'#value' => t('Preview'),
'#weight' => 10,
'#submit' => array('node_form_build_preview'),