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

CommentFileSizeAuthor
#6 book.module_53826.patch3 KBpuregin
#2 book_43.patch595 byteskeve
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

chx’s picture

try b6 and report back. imo this is fixed.

keve’s picture

Version: 4.7.0-beta5 » x.y.z
Status: Active » Needs review
FileSize
595 bytes

This patch is for cvs.

(This bug also affects 4.6.5)

keve’s picture

Sorry, chx. I have not noticed your comment.

This issue is not fixed with beta6. My patch fixes, the db_rewrite_sql query.

puregin’s picture

Sigh, 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

puregin’s picture

OK, here is said patch.

puregin’s picture

OK, here is said patch.

This removes the redundant _book_get_depth() function; and replaces the one call to this with a call book_location location instead. Less code to maintain.

killes@www.drop.org’s picture

Status: Needs review » Fixed

tested, export still works, applied

Anonymous’s picture

Status: Fixed » Closed (fixed)