When in the update hooks, we run a node_load() before running print_pdf_update_7203(), print_pdf_node_load() will attempt to load the database column "size", however this has not been created yet.

The following issues refer to this problem as well:

#1617654: Print doc
#2297701: Need to remove breadcrumbs and URL from Print pages

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

stefan.r’s picture

Priority: Normal » Major
Status: Active » Needs review
FileSize
628 bytes

Upgrading priority as it can make a database update break due to a fatal error, preventing other update hooks from running.

Jorrit’s picture

I think executing db_field_exists() on every node load is a bit too expensive, it executes a query every time it is called.

The attached patch handles PDOExceptions while executing the query, which makes sure that the code executes properly without the columns.

froboy’s picture

Status: Needs review » Reviewed & tested by the community

I just updated an old site from 7.x-1.3 to 7.x-2.2 and this patch allowed me to proceed successfully. It's pretty straightforward, didn't seem to take too long, and works. LGTM.

Jorrit’s picture

Did you test patch #1 or patch #2?

  • jcnventura committed 4e2acce on 7.x-2.x authored by Jorrit
    Issue #2446939 by stefan.r, Jorrit, jcnventura: PDOException: SQLSTATE[...
jcnventura’s picture

Thanks everyone!

jcnventura’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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