Ensure module work althought not exists body field
This commit is contained in:
parent
3c2bb788b4
commit
89bcb3d481
1 changed files with 1 additions and 1 deletions
|
@ -151,7 +151,7 @@ function _nodecomment_alter_nodecomment_form(&$form, $node, $target_node = NULL,
|
||||||
$form['comment_settings']['#access'] = FALSE;
|
$form['comment_settings']['#access'] = FALSE;
|
||||||
|
|
||||||
// Remove the teaser splitter if body field is present.
|
// Remove the teaser splitter if body field is present.
|
||||||
if (isset($form['body_field'])) {
|
if (isset($form['body_field']) && is_array($form['body_field']['#after_build'])) {
|
||||||
$teaser_js_build = array_search('node_teaser_js', $form['body_field']['#after_build']);
|
$teaser_js_build = array_search('node_teaser_js', $form['body_field']['#after_build']);
|
||||||
unset($form['body_field']['#after_build'][$teaser_js_build]);
|
unset($form['body_field']['#after_build'][$teaser_js_build]);
|
||||||
$form['body_field']['teaser_js']['#access'] = FALSE;
|
$form['body_field']['teaser_js']['#access'] = FALSE;
|
||||||
|
|
Reference in a new issue