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.
I recently migrated all my data from the image module to filefield/imagefield using the contributed script. Everything seemed to work well except for that now my log shows hundreds of "FileField was trying to display the file but it does not exist." warnings. All my files still do exist and the paths listed in the database appear to be correct. All the images also display properly on the site. Is there a table that didn't get populated properly when I migrated over? Let me know if any other information is needed.
Thanks
Comments
Comment #1
quicksketchThe only table that contains file paths is the "files" table, so as long as those paths are correct FileField should not be reporting those errors. Note that the file path includes the files directory, such as "sites/default/files/subdirectory/image.png". You must have your files directory configured at admin/settings/file-system line up with this prefix in the files table.
Comment #2
quicksketchComment #3
quicksketchComment #4
xjmI'm getting this same error message in my logs, despite that the images in the field seem to display just fine. The config at
admin/settings/file-system
matches the part of the file path that does not appear in the error message or database table. I also migrated with a script. Maybe a cache issue?Edit: If you're using imagecache, see also #649206: FileField was trying to display the file XXXXX, but it does not exist..
Comment #5
Vuds CreditAttribution: Vuds commentedHello,
I'd like to report that I'm still suffering about this warning message. Under conditions that I couldn't study yet (for example, it appears for me for one content type that has an imagefield, and on another that also have an imagefield, it doesn't appear), the messages are constantly logged.
What I could see is that it's a problem between Filefield (or the other modules that work with it) and the system cache. It appears that in the "cache_content" table Drupal saves the archive name before it's renamed/moved for another directory when I create a node. So when you immediately see the node after creation (and some time after that), it consults the cache and generates the error.
I had tested it by looking for in the database using an archive name that was giving me the warning when I saw determinated node. After that, I experimented reset the cache, then reloaded the node to view again. Doing this, the system did not warned any more on that node.
The other dependent or related modules from Filefield that I'm using include: imagecache, imagefield, transliteration, filefield paths.
Comment #6
quicksketch@Vuds: You should file a bug with your report in the FileField Paths queue, since without that module, the files are never moved and the caches would be accurate.
Comment #8
jmseigneur CreditAttribution: jmseigneur commentedSubscribing. Same problem.
Comment #9
DrakeTaylor CreditAttribution: DrakeTaylor commentedThis happened to me today. For performance reasons I had to move the site settings.php and files from default to 'www.site.com'. After I did this, The logs were full of the same error. I wrote a drush script to change the path of the files in the database, but for some reason the errors kept coming up. It was only after I cleared the cache at 'admin/settings/performance' did the errors stop. Hope this helps someone else.