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.
This may be a unique situation, but I have an issue where sometimes temporary files are no longer on the filesystem, so when I upload the csv it finds a filename that it can save it as, but when inserting an entry into the file_managed table, it causes a PDO duplicate entry error. That is because there is an entry in the db table for a file that doesn't exist anymore. With this module, there isn't really a reason to save every csv upload separately, so why not just let it overwrite any existing files? This fixes the error. Patch to come.
Comment | File | Size | Author |
---|---|---|---|
#2 | tablefield-file_replace-2804201-1.patch | 738 bytes | bdlangton |
Comments
Comment #2
bdlangton CreditAttribution: bdlangton commentedComment #3
lolandese CreditAttribution: lolandese at HCL Technologies Limited commentedI am not able to reproduce the issue. I tried deleting a file from the table file_managed and upload it again. That works without problems.
I do not see much harm in adding some parameters to the function file_save_upload. Nonetheless can you provide the steps necessary to reproduce the issue?
Comment #4
lolandese CreditAttribution: lolandese at HCL Technologies Limited commented