Description
When a user doesn't have node admin privs and tries to xpoprt a docbook xml or look at a printer-friendly version I get this:
Warning: Unknown column 'n.nid' in 'on clause' query: _book_get_depth SELECT b.parent FROM book b INNER JOIN node_access na ON na.nid = n.nid WHERE (na.grant_view >= 1 AND ((na.gid = 0 AND na.realm = 'all') OR (na.gid = 1 AND na.realm = 'term_access'))) AND b.nid = 23 in C:\Keve\http\cvs\includes\database.mysql.inc on line 120
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | book.module_53826.patch | 3 KB | puregin |
| #2 | book_43.patch | 595 bytes | keve |
Comments
Comment #1
chx commentedtry b6 and report back. imo this is fixed.
Comment #2
keve commentedThis patch is for cvs.
(This bug also affects 4.6.5)
Comment #3
keve commentedSorry, chx. I have not noticed your comment.
This issue is not fixed with beta6. My patch fixes, the db_rewrite_sql query.
Comment #4
puregin commentedSigh, I thought I'd managed to remove
_book_get_depth()from the 4.7 version. Must have been in a patch that didn't make it through.The proper fix would be to remove this function and replace with calls to
book_location(). Give me a mo' to whip up a patch.Djun
Comment #5
puregin commentedOK, here is said patch.
Comment #6
puregin commentedOK, here is said patch.
This removes the redundant
_book_get_depth()function; and replaces the one call to this with a callbook_locationlocation instead. Less code to maintain.Comment #7
killes@www.drop.org commentedtested, export still works, applied
Comment #8
(not verified) commented