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.

CommentFileSizeAuthor
no_delete_upload.patch.txt863 bytesvhmauery

Comments

vhmauery’s picture

Project: Version » Video

Not sure how this got in the Version queue -- it was intended for Video. Oops.

Moxide’s picture

+1
Thanks, it solved the problem for me !

vhmauery’s picture

Status: Needs review » Needs work

This 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.

frjo’s picture

I 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.

fax8’s picture

Status: Needs work » Postponed (maintainer needs more info)

Mmmm.... I'm not able to reproduce this one...

Could you please add details on how to reproduce this?

Thanks,

Fabio

fax8’s picture

Status: Postponed (maintainer needs more info) » Active
jjeff’s picture

I 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.

fax8’s picture

Status: Active » Postponed (maintainer needs more info)

this 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

hypertext200’s picture

Status: Postponed (maintainer needs more info) » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.