With video upload enabled, I am seeing the video file get deleted when I go to edit the node. Simply going to the edit path, not even hitting submit, preview or delete will delete the file. This is because the file is getting deleted in the _video_upload_prepare function. It gets called when displaying a video edit page. It checks to see if we are POSTing or just started the edit. If it sees that the video_upload_file is set in the session, it will delete it.
I have not figured out what causes this yet -- it seems to happen rather sporadically. I first noticed it while using the video types patch. So I removed that patch. Then I saw it again just using Acidfree. So I disabled that and I haven't seen it yet, so it still may be some interaction there. But it appears that others are occasionally seeing this as well --> http://drupal.org/node/74170. So I am not sure what to think.
The attached patch seems to be fairly safe either way. It seems to fix the problem for me. Basically, if we are dealing with an existing node (editing rather than adding) it doesn't delete the file in _video_upload_prepare.
| Comment | File | Size | Author |
|---|---|---|---|
| no_delete_upload.patch.txt | 863 bytes | vhmauery |
Comments
Comment #1
vhmauery commentedNot sure how this got in the Version queue -- it was intended for Video. Oops.
Comment #2
Moxide commented+1
Thanks, it solved the problem for me !
Comment #3
vhmauery commentedThis is not the right approach. I think this section of the video upload code needs some attention. I will try to find some time to re-think the code.
Comment #4
frjo commentedI can confirm this bug. On edit the video file is deleted. I have commented out the line "file_delete(..." as a temporary solution.
Now I instead get multipel entries in file attachments for the uploaded video file, on entry is added every time the node is saved/submited. A minor annoyance compared to having the video file deleted ;-).
I will make some attempts myself to find the root cause for this problem.
Comment #5
fax8 commentedMmmm.... I'm not able to reproduce this one...
Could you please add details on how to reproduce this?
Thanks,
Fabio
Comment #6
fax8 commentedComment #7
jjeff commentedI can confirm as well...
Steps to reproduce (if memory serves):
1) Create a new video node using the video_upload field (not the upload.module field).
2) Edit the node and save.
3) Video is gone.
Note that both upload.module and videoupload are enabled. This happened to me using the 4.7 version.
Comment #8
fax8 commentedthis is a critical bug.. but I can't reproduce.
Can you please tell me what are the settings on video administrations???
I think that only one combination show the problem as I'm not noticing it with mine.
Thanks,
Fabio
Comment #9
hypertext200