When I go to /admin/node/book I get a completely blank page. I've looked into book.module and if I modify the book_admin function to initialise $output with any character (a space in the code below) then the page is displayed "The book module offers a mean to organize content, authored by many users, in an online manual, outline or FAQ." . As soon as I take it out or make it $output = ''; the page again is not displayed.

Why is this? How is book_help being called to display the help message above?

function book_admin($nid = 0) {
  $op = $_POST['op'];
  $edit = $_POST['edit'];
  // KJP - if I don't add this the page is never displayed (NO output) for /admin/node/book
  $output = ' ';

  switch ($op) {
    case t('Save book pages'):
      drupal_set_message(book_admin_save($nid, $edit));
      // fall through:
    default:
       $output .= book_admin_view($nid);
     break;
  }
  return $output;
}
CommentFileSizeAuthor
#1 show error on book id not found.patch615 bytesRobinMonks

Comments

RobinMonks’s picture

Version: 4.6.0 »
Assigned: Unassigned » RobinMonks
StatusFileSize
new615 bytes

This patch displays an error when the node is not found, and redirects the user to admin, since they can't administer a node that dosn't exist anyways.

Robin

puregin’s picture

Hi Robin,

this issue is a duplicate of

http://drupal.org/node/21441