Closed (fixed)
Project:
Drupal core
Version:
6.x-dev
Component:
book.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
14 Oct 2008 at 12:49 UTC
Updated:
6 Jun 2011 at 12:02 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
Anonymous (not verified) commentedCode looks correct. We need a test.
Comment #2
eMPee584 commentedwell i do not yet know anything about simpletest and doubt i will have the time to learn it within the next week.
Comment #3
kars-t commentedThis still applies.
To recreate:
Just install, activate the book module and load "/book/export/html/12345" and it will crash.
I remade the patch. With this we get a nice 404. And I added a test to the testBookExport() testcase.
Comment #4
grendzy commentedhm, seems like the check should be in book_export() ?
Comment #5
kars-t commentedHi,
http://api.drupal.org/api/function/book_export/7
we would have to change this function a lot as the node is not loaded and there are no checks. book_export() is just a wrapper and loads us the real export function.
book_export_html() does all the stuff we need. I'd say not to blow up this issue and rewrite book_export().
Comment #6
pillarsdotnet commentedRe-rolled against current D7 HEAD.
I can confirm the bug.
The patch fixes the bug.
Comment #7
pillarsdotnet commentedtestbot is green
patch in #6 is (coding-wise) the same as #3
Testing on my site confirms both the bug and the fix.
Comment #8
webchickThanks for the fix, and for the test!
Committed to HEAD.
Marking down to 6.x.
Comment #9
pillarsdotnet commentedPatch for d6 is identical to patch for d7, except for the tests.
Comment #10
gábor hojtsyLooks good, and patch seems to have a history of people testing it (with previous identical relative code changes), so committed. Thanks!