With 4.7.2 and the video module, whenever I re-edit a video node, for example, add a thumnail to the video, and the submit to save it, if I go back and edit it again, there are two videos listed in the file attachments. It keeps adding the same video to the list every time I edit it, up to 5 or 6, I've tested.

This mod is quite nice. Thanks for the contribution.

Comments

consen’s picture

I have the same problem

dvessel’s picture

I get the same. The file id gets incremented on every edit even though it's referencing the same file.

dvessel’s picture

Is this an isolated issue? Another side effect is that if you delete any of the extra file attachments, it deletes the video.

Each file id thinks it owns the same video file. Seems like a significant bug.

ron collins’s picture

+1 on that. we can't roll it out like this.

shunshifu’s picture

I have the same problem.

In addition when I edit then oftentimes the video will no longer playback. The page comes up but the video won't play. When I look at the logs there has been a page not found error.

Occassionally I get the error "Your video was not saved" when just editing, not trying to upload a video.

Thanks

Shunshifu

roleychiu’s picture

I'm not getting the duplicate video upon new posts, but I am experiencing that random error on playback issue like the person above me. Upon successful upload and successful multiple views of the video, it seems that randomly, a video will not play back and will be stuck on the initial 'buffering' stage and never load. It happens on on different files, each hanging after a different number of views. I initially thought it was a connection problem and that the video will eventually play upon future refreshes, but it appears that once the video 'dies', it does not recover.

roleychiu’s picture

I also get the "your video was not saved" which happens sporatically and seemingly randomly when i edit video files. editing image nodes seems to be unnaffected.

fax8’s picture

StatusFileSize
new814 bytes

the attached patch should fix this problem for 4.7.

Fabio

fax8’s picture

StatusFileSize
new814 bytes

the attached patch should fix the problem for 5.0

Fabio

fax8’s picture

Status: Active » Needs review
StatusFileSize
new982 bytes

Ignore the above patch. Use this one for 5.0.

I'm waiting some positive feedback, then this will be committed.

Thanks,

Fabio

Chris Johnson’s picture

There are multiple problems being mentioned in the comments on this issue.
I have seen the duplicated attachments.

I have seen and I know why the videos sometimes don't play after the same or other video nodes have been edited: the video_upload.module is renaming and deleting files when it shouldn't be doing so. I'm not sure exactly why yet, or I'd fix it myself. It seems to be some kind of strange, improper interaction between the video_upload.module and core's file.inc and upload.module.

I think the duplicated attachments and the missing videos, and perhaps a few other problems, are all a result of this improper interaction, because if one carefully observes what happens in the filesystem (the actual files being created, copied and deleted) as well as what is happening in the node, files, file_revisions and video tables, one can see that gradually the database becomes more and more corrupted or confused, until finally _video_upload_prepare() is called with count($_POST) == 0, and a file (not necessarily the right one!) gets deleted.

I haven't figured out why the node revisions and file names are getting confused in the database, but it appears that _video_upload_store() is being called at times when no files are being uploaded. Maybe that's intentional, but it seems like confused fucntionality to me.

I'm going to create a new issue for the video files being wrongly deleted, unless there already exists such an issue.

fax8’s picture

Status: Needs review » Fixed

all the shitty code causing those problems should have been removed and fixed on the upcoming rewrite.

Fabio

Anonymous’s picture

Status: Fixed » Closed (fixed)