Index: modules/book/book.admin.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/book/book.admin.inc,v retrieving revision 1.38 diff -u -p -r1.38 book.admin.inc --- modules/book/book.admin.inc 20 Oct 2010 01:31:06 -0000 1.38 +++ modules/book/book.admin.inc 8 Nov 2010 16:56:14 -0000 @@ -175,6 +175,10 @@ function _book_admin_table($node, &$form * @see book_admin_edit() */ function _book_admin_table_tree($tree, &$form) { + // The delta must be big enough to give each node a distinct value. + $count = count($tree); + $delta = ($count < 30) ? 15 : intval($count / 2) + 1; + foreach ($tree as $data) { $form['book-admin-' . $data['link']['nid']] = array( '#item' => $data['link'], @@ -190,7 +194,7 @@ function _book_admin_table_tree($tree, & 'weight' => array( '#type' => 'weight', '#default_value' => $data['link']['weight'], - '#delta' => 15, + '#delta' => $delta, '#title' => t('Weight for @title', array('@title' => $data['link']['title'])), '#title_display' => 'invisible', ), Index: modules/book/book.module =================================================================== RCS file: /cvs/drupal/drupal/modules/book/book.module,v retrieving revision 1.555 diff -u -p -r1.555 book.module --- modules/book/book.module 5 Nov 2010 19:47:20 -0000 1.555 +++ modules/book/book.module 8 Nov 2010 16:56:14 -0000 @@ -506,11 +506,12 @@ function _book_add_form_elements(&$form, $form['book']['plid'] = _book_parent_select($node->book); + // @see _book_admin_table_tree(). The weight may be larger than 15. $form['book']['weight'] = array( '#type' => 'weight', '#title' => t('Weight'), '#default_value' => $node->book['weight'], - '#delta' => 15, + '#delta' => max(15, abs($node->book['weight'])), '#weight' => 5, '#description' => t('Pages at a given level are ordered first by weight and then by title.'), );