Closed (fixed)
Project:
FileField
Version:
6.x-3.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
6 Aug 2008 at 21:46 UTC
Updated:
26 Feb 2009 at 21:00 UTC
Jump to comment: Most recent file
Comments
Comment #1
drewish commentedI traced nonsie's issue back to field_file_save()... it doesn't know that a file is a replacement so it can't call field_file_delete() which would take care of removing the admin image.
Comment #2
dopry commentedbecause the file is removed from the node not, deleted. this will change before release but is how it works currently.
Comment #3
drewish commentedit's clearly a bug.
marked #292539: File not removed from filesystem on file remove and #293176: Files not delete in database and directory as duplicates
Comment #4
dopry commentedThis is a beta blocker. Need to track removed files in form_state and on #submit field_file_delete them.
Comment #5
drewish commentedmarked #297655: Delete the files in the directory and in the files table as a duplicate
Comment #6
klaus66 commentedHello,
i don't understand what beta blocker mean.
Can you explain that.
Thank you.
Klaus
Comment #7
klaus66 commentedHello,
I see there is now an alpha4.
My question is now when it is planed that the "file delete problem" will be fixed.
I think on a production site where users can upload files and remove them it is not possible to work with this module at the moment.
best regards
Klaus
Comment #8
drewish commentedmarked #306313: Replacing a file with a new upload doesn't remove the previous one. as a duplicate
Comment #9
ellanylea commentedFiles still not deleted when replaced in 6.x-3.0-alpha5. Would be happy to test patch if any.
Comment #10
ipto commentedWhen i press delete button in edit node page and press save image dont't show in node view, but in BD table=files deleted files status=1 (active, used). This is not possible to remove unused files.
Comment #11
dopry commentedyep file delete's aren't happening yet.. It's sorta by design.. I meant to have a filebrowser in place by now.. but haven't gotten around to it.. I'll get the delete functionality in fairly soon I think..
Comment #12
drewish commentedmarked #318044: Files are not deleted as a duplicate
Comment #13
drewish commentedmarked #340499: Deleting image from field does not remove file as a duplicate.
Comment #14
drewish commentedmarked #327022: temporary uploaded files not deleted as a duplicate
Comment #15
adaven commentedsubscribing
Comment #16
ilfelice commentedSubscribing
Comment #17
trevorsheridan commentedThis summer I amended either this module for D5 or the Image Attach (can't remember which) to do what we need done here. I am wondering if there is any work already being done on this or if I should just go ahead and do it this weekend? (If so I will create it for D6 and if I did create it this summer for this module already I will provide what I did for D5 as well. Thoughts?
Trevor
Comment #18
mfb[subscribing]
Comment #19
gábor hojtsyAndrew Morton says this bug is vital for drupal.org to start get using FileField / ImageField.
Comment #20
ddauer commentedsubscribing
Comment #21
drewish commentedmarked #359811: filefield does not delete file on node delete as a duplicate
Comment #22
akael commentedAny update on this bug?
Comment #23
gábor hojtsyNot applicable to upgrade, since we found that keeping image module for now works once we fixed its upgrade path.
Comment #24
smithn.nc commentedSubscribing.
Comment #25
dopry commentedfixed in HEAD.
Comment #26
dagmarHello dopry:
I have tested filefield 6.x-3.x-dev and I'm think that this issue is not completly solved.
First, when I create a new node, files uploaded with filefield are not attached to the nodes, and php displays an invalid foreach() warning.
I have created a small patch that solves this bug, but there is another problem.
When users replace a file without submit the node (the first time), files are not deleted.
For example:
go to: node/add/page
upload a field with filefiled.
replace this file with another one
submit the node
The first file is still in the table {files} and in the disk.
I have marked my pacth as (code need work) because it doesn't solve the second issue.
Comment #27
markus_petrux commentedhmm... but that file would exist marked as temporary in the files table, and that's expired by system_cron(), AFAICT.
Comment #28
dagmarI did not know of this characteristic. I see that was introduced in Drupal 6.
Well in this case, I'm think that the last patch will be enought to solve the issue.
Changing status.
Comment #29
dopry commentedcommitted to HEAD with modifications.
Comment #30
philsward commentedEven on a cron run using the 6.x-3.x-dev (2009-Feb-06) version, I am still seeing files on the server if a file is added, removed, another added and then the node is saved... http://drupal.org/node/369450
Comment #31
dagmarThis is how system_cron() works
DRUPAL_MAXIMUM_TEMP_FILE_AGE in seconds is:
Then, you have to wait at least 6 hours to delete a file with system_cron()