When running cronjobs on a drupal installation with table prefix, the following error shows up:
Unknown column "files.fid" in "where clause" query: DELETE wui,wuir FROM drupal_wysiwyg_imageupload_entity AS wui LEFT JOIN drupal_wysiwyg_imageupload_entity_revision AS wuir ON wui.iid=wuir.iid WHERE NOT EXISTS (SELECT fid from drupal_files WHERE wui.fid=files.fid) in /www/sites/all/modules/wysiwyg_imageupload/wysiwyg_imageupload.file.inc on line 171.
The fix is simple, just add { } around the last files.fid in the query on line 171 in wysiwyg_imageupload.file.inc.
db_query('DELETE wui,wuir FROM {wysiwyg_imageupload_entity} AS wui LEFT JOIN {wysiwyg_imageupload_entity_revision} AS wuir ON wui.iid=wuir.iid WHERE NOT EXISTS (SELECT fid from {files} WHERE wui.fid={files}.fid)');
ps. I do not know if this is the right place to submit fixes, I am new to drupal.org and plugin development.
Best regards, Egil.
Comments
Comment #1
eugenmayer commentedgood catch! Thanks for the contribution
Comment #2
eugenmayer commentedsolved differently ( alias ). Will be included in 2.8. Thanks!
Comment #3
eugenmayer commented