Index: modules/node/node.pages.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/node/node.pages.inc,v retrieving revision 1.2 diff -u -p -r1.2 node.pages.inc --- modules/node/node.pages.inc 9 Sep 2007 19:52:29 -0000 1.2 +++ modules/node/node.pages.inc 16 Sep 2007 03:56:31 -0000 @@ -231,10 +231,15 @@ function node_body_field(&$node, $label, $form = array( '#after_build' => array('node_teaser_js')); + //Teaser splitter needs to know the ID of the form element for the body. + //Instead of letting FAPI auto-generate an ID, we should specifically + //generate an ID for ourselves so we know what it will be. + $bodyid = form_clean_id('edit-' . $node->type . '-node-form-body'); + $form['teaser_js'] = array( '#type' => 'textarea', '#rows' => 10, - '#teaser' => 'edit-body', + '#teaser' => $bodyid, //Tell the jQuery code about our body element ID. '#teaser_checkbox' => 'edit-teaser-include', '#disabled' => TRUE); @@ -251,6 +256,7 @@ function node_body_field(&$node, $label, '#title' => check_plain($label), '#default_value' => $include ? $node->body : ($node->teaser . $node->body), '#rows' => 20, + '#id' => $bodyid, //Explicitly set the ID we got above. '#required' => ($word_count > 0)); $form['format'] = filter_form($node->format);