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.
All tables should use curly brackets.
For example:
$query = db_query("SELECT fm.* FROM file_managed AS fm ...
Should be:
$query = db_query("SELECT fm.* FROM {file_managed} AS fm ...
If you use prefixed tables with the current code:
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'file_managed' doesn't exist: SELECT fm.* FROM file_managed AS fm LEFT OUTER JOIN file_usage AS fu ON (fm.fid = fu.fid) LEFT OUTER JOIN node AS n ON (fu.id = n.nid) WHERE fu.type = 'node' AND n.nid IS NULL; Array ( ) a FancyFileDeleteOrphanFileFilter->query() (línia 25 de /var/local/html/drupal7/node1/sites/transparencia.diba.cat/modules/contrib/fancy_file_delete/views/inc/FancyFileDeleteOrphanFileFilter.inc).
Comment | File | Size | Author |
---|---|---|---|
#5 | 2736623-5.patch | 1.52 KB | oriol_e9g |
Comments
Comment #2
oriol_e9gComment #3
oriol_e9gComment #4
labboy0276 CreditAttribution: labboy0276 commentedThanks, I actually fixed this in this issue: https://www.drupal.org/node/2721831
Comment #5
oriol_e9gThe last version it's not solving the problem. The curly bracket arround node table is missing.
This is the patch to fix it.
Comment #6
labboy0276 CreditAttribution: labboy0276 commentedGood catch, thanks for the patch, committed to dev.