Getting some empty queries from
$file = db_select('files', 'f')->fields('f', array('fid', 'uid', 'filename', 'filepath', 'filemime', 'filesize', 'timestamp', 'status'))->condition('fid', $fid)->execute()->fetchObject();
Fixed this with:
if(is_object($file)){
full error:
An AJAX HTTP error occurred. HTTP Result Code: 500 Debugging information follows. Path: /batch?id=1957&op=do StatusText: Service unavailable (with message) ResponseText: PDOException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'uid' cannot be null: INSERT INTO {file_managed} (fid, uid, filename, uri, filemime, filesize, status, timestamp) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7); Array ( [:db_insert_placeholder_0] => [:db_insert_placeholder_1] => [:db_insert_placeholder_2] => [:db_insert_placeholder_3] => private:// [:db_insert_placeholder_4] => [:db_insert_placeholder_5] => [:db_insert_placeholder_6] => [:db_insert_placeholder_7] => ) in content_migrate_filefield_data_record_alter() (line 229 of /www/www-staging/drupal.sandbox.sanger.ac.uk/htdocs/sites/all/modules/contrib/cck/modules/content_migrate/modules/content_migrate.filefield.inc).
Comments
Comment #1
jenlamptonI'm having the same problem with
This patch prevented the error for me too, but I cleaned up the patch a little.
Comment #2
stephenrobinson commenteda much tidier alternative...
Comment #3
iamEAP commentedWorks wonderfully for me! RTBC.
Comment #4
yched commentedCommitted. Thanks !
Comment #5
yched commented