[drupal-devel] [bug] admin/node/book produces a blank page

Dries drupal-devel at drupal.org
Thu May 5 09:17:59 UTC 2005


Issue status update for http://drupal.org/node/21441

 Project:      Drupal
 Version:      cvs
 Component:    book.module
 Category:     bug reports
 Priority:     normal
 Assigned to:  RobinMonks
 Reported by:  moshe weitzman
 Updated by:   Dries
 Status:       patch

Robin,


1. You don't have to pass book_admin_render() a $nid because it is
known to be empty.  A typo, I guess.


2. In book_admin_render(), you're not allowed to visualize a node like
that.  For example, you have to prepare the $node->teaser before it can
be displayed, and you should allow other modules to modify/prepare it
through the node API.


I'll fix it up for you, and commit it to HEAD.




Dries



Previous comments:
------------------------------------------------------------------------

April 27, 2005 - 21:20 : moshe weitzman

probably a result of the recent patch where we return content instead of
print.




------------------------------------------------------------------------

April 29, 2005 - 02:41 : puregin

Attachment: http://drupal.org/files/issues/book.module_blank_admin_page.patch (488 bytes)

The function book_admin_view() does not return a non-empty string if
$nid is zero, which is the default value if /admin/node/book is
visited.  


The attached patch returns 'No book selected.'.  There's probably a
better way to do this.




------------------------------------------------------------------------

May 1, 2005 - 18:03 : Dries

Note that you have to wrap strings in t().


How about removing the books from the navigation menu, and returning an
itemized list of books?




------------------------------------------------------------------------

May 2, 2005 - 15:30 : RobinMonks

I also wrote a patch for this for issue http://drupal.org/node/21668


http://drupal.org/files/issues/show%20error%20on%20book%20id%20not%20found.patch


This patch returns an error whenever the book ID cannot be found, then
redirects the user back to admin with the message.


Robin




------------------------------------------------------------------------

May 4, 2005 - 15:49 : RobinMonks

Attachment: http://drupal.org/files/issues/show error on book id not found_0.patch (2.04 KB)

This patch corrects the function of admin/node/book.


Robin







More information about the drupal-devel mailing list