Index: weight.module =================================================================== --- weight.module (revision 405) +++ weight.module (revision 406) @@ -131,8 +131,8 @@ // Node edit page weight selector. if (isset($form['type']) && $form['type']['#value'] .'_node_form' == $form_id) { + $node = $form['#node']; if (user_access('assign node weight') || user_access('administer nodes')) { - $node = $form['#node']; if (in_array($node->type, $weight_node_types)) { $range = variable_get('weight_range', 20); $position = variable_get('weight_position', 0); @@ -166,6 +166,11 @@ $form['weight_form']['node_weight']['#description'] .= '
'. t('Note: If this node is used in a menu, then this weight will be ignored.'); } } + } else { + $form['node_weight'] = array( + '#type' => 'value', + '#value' => (int)$node->node_weight, + ); } } }