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

jcnventura’s picture

I take it you use database table prefixes.. I forgot to test that variant. Thanks for reporting this.

mfby2k’s picture

thanks 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)

jcnventura’s picture

Status: Active » Fixed

No need to do that, I've just committed the proper fix in

http://drupalcode.org/project/print.git/commit/f0ba884

Status: Fixed » Closed (fixed)

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

Jya_X’s picture

Hello,
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 1

The 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 ?