Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #1
Jeremy CreditAttribution: Jeremy commentedIs 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...
Comment #2
DrDres CreditAttribution: DrDres commentedyou 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?
Comment #3
bdragon CreditAttribution: bdragon commentedYup, 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.
Comment #4
13rac1 CreditAttribution: 13rac1 commentedThis looks to be a dupe of #766382: Column 'nid' is ambiguous when using node access modules
Comment #5
somatics CreditAttribution: somatics commentedIs 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
Comment #6
Jeremy CreditAttribution: Jeremy commentedFixed in core, closing.