as the title says:

I have two books on my site. working fine. When I enable the support ticketing module, I get an 'unexpected error' when trying to get to the bookpages.

Comments

Jeremy’s picture

Status: Active » Postponed (maintainer needs more info)

Is there anything more to the error? Perhaps in the watchdog logs? The complete error message will be helpful in trying to track something like this down...

DrDres’s picture

you are quite right......

the book pages are fine as long as there are no support clients configured/enabled.. but when I have added a client, I get
the 'unexpected error'

"PDOException: SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'nid' in where clause is ambiguous: SELECT n.title AS title FROM {node} n LEFT OUTER JOIN {support_ticket} st ON st.nid = n.nid WHERE (nid = :db_condition_placeholder_0) AND (n.type <> :db_condition_placeholder_1) AND( (st.client IN (:db_condition_placeholder_2)) OR (st.client IS NULL ) ); Array ( [:db_condition_placeholder_0] => 699 [:db_condition_placeholder_1] => support_ticket [:db_condition_placeholder_2] => 1 ) in book_block_view() (line 286 of /modules/book/book.module)."

maybe its a book module - error?

bdragon’s picture

Status: Postponed (maintainer needs more info) » Active

Yup, it's a problem in book.module -- it's using an unqualified 'nid' condition.
There is a patch at
http://drupal.org/node/766382#comment-4626166

I suppose we could actually work around this on our end by taking $query->conditions by reference and fixing up unqualified conditions.

13rac1’s picture

somatics’s picture

Is this really an error with book.module, as stated in #3 ? If so, this problem with book.module appears to be rampant across other modules:

I am seeing this "LEFT OUTER JOIN {support_ticket} st ON st.nid = n.nid" in blocks listing forum topic nodes, in views showing taxonomy depth, and several other places I am still cataloging. It's the single problematic element (and common denominator in all these bugs on our site, and it's causing fatal errors: The pages just return a WSOD or an error warning or zero results for views. It's a huge problem for us.

I can't even disable the Support Ticket module without uninstalling it, because disabling it leaves some legacy data that then causes other problems. My issue about this is at http://drupal.org/node/1376120

Jeremy’s picture

Status: Active » Fixed

Fixed in core, closing.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.