Closed (fixed)
Project:
Printer, email and PDF versions
Version:
7.x-1.1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
14 Jun 2012 at 19:19 UTC
Updated:
30 Apr 2013 at 08:30 UTC
I am getting this error and pages are not showing when i put most PDFed or Most emailed or most printed block in any region of page.
PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'node.nid' in 'on clause': SELECT path FROM {print_mail_page_counter} LEFT JOIN {node} ON path = CONCAT('node/', node.nid) WHERE status <> 0 OR status IS NULL ORDER BY sentcount DESC LIMIT 0, 3; Array ( ) in print_mail_block_view() (line 150 of .....sites/all/modules/print/print_mail/print_mail.module).
Comments
Comment #1
jcnventuraI take it you use database table prefixes.. I forgot to test that variant. Thanks for reporting this.
Comment #2
mfby2k commentedthanks for the reply
Should i update these three queries
print.module $result = db_query_range("SELECT path FROM {print_page_counter} ORDER BY totalcount DESC", 0, 3)
print_pdf.module $result = db_query_range("SELECT path FROM {print_pdf_page_counter} ORDER BY totalcount DESC", 0, 3)
print_mail.module $result = db_query_range("SELECT path FROM {dr_print_mail_page_counter} ORDER BY sentcount DESC", 0, 3)
with this
print.module $result = db_query_range("SELECT path FROM {dr_print_page_counter} ORDER BY totalcount DESC", 0, 3)
print_pdf.module $result = db_query_range("SELECT path FROM {dr_print_pdf_page_counter} ORDER BY totalcount DESC", 0, 3)
print_mail.module $result = db_query_range("SELECT path FROM {dr_print_mail_page_counter} ORDER BY sentcount DESC", 0, 3)
Comment #3
jcnventuraNo need to do that, I've just committed the proper fix in
http://drupalcode.org/project/print.git/commit/f0ba884
Comment #5
Jya_X commentedHello,
I have the "same" problem but the file you posted doesn't work :
When I remplace the files I have :
Parse error: syntax error, unexpected T_STRING in /homez.626/associaty/www/sites/all/modules/print/print.module on line 1The original error message on my home page is :
PDOException : SQLSTATE[42S22]: Column not found: 1054 Unknown column 'node.nid' in 'on clause': SELECT path FROM {print_page_counter} LEFT JOIN {node} ON path = CONCAT('node/', node.nid) WHERE status <> 0 OR status IS NULL ORDER BY totalcount DESC LIMIT 0, 3; Array ( ) dans print_block_view() (ligne 298 dans /homez.626/associaty/www/sites/all/modules/print/print.module).Have you an issue please ?