Hi everyone
this is my first bug report =). I've installed Video 6.x-4.1-rc2 module and after creating about 40 video nodes and selected each thumbs, without reason thumbs has been deleted. Now i need to re-edit every node and re-select everything. Does anyone knows if it's a bug or a misconfiguration of my server? Permissions are 777 everywhere in directory /files/ and I didn't see anything in log (no users deleted accidentally).
I read a similar bug in older versions but I don't know if it has been fixed.
Thanks in advice
| Comment | File | Size | Author |
|---|---|---|---|
| #48 | video.module-906262-2.patch | 662 bytes | tacituseu |
| #42 | video-906262.patch | 1.62 KB | tacituseu |
| #37 | video_906262.diff | 1.21 KB | hypertext200 |
| #21 | video-906262-21.patch | 1.24 KB | peximo |
Comments
Comment #1
Passer commented*confirmed*
Here the Thumbs are deleted too.
Ill tae a look for the problem this day and Ill post my suggestions here
Comment #2
hypertext200What are the steps you follow? did u follow the documentation?
Comment #3
Passer commentedThe Module works fine, but if a new Video-Node is created, the video-thumbs folder is deleted automatically.
Than every node has to be opened in Edit-Mode to recreate the Folder+Thumbnails.
Comment #4
hypertext200Are you using FFMPEG for transcoding? what is the trancoder your using?
Comment #5
JoshW commentedim getting this too. I have custom thumbnails enabled and i put an image in when i create the node but if i go back in and change some text in the description the thumbnail magically disappears.
Comment #6
erikvip commentedI have this issue as well with Manual upload images. All transcoding is disabled.
Comment #7
hypertext200Fixed in dev
Comment #8
JoshW commentedi have the same setup as erikvip and i tried the new dev and i am still getting lost images.
Comment #9
erikvip commentedI tested this with the latest 6.x-4.x-dev (2010-09-19) and the issue remains.
Here's a half-assed workaround:
Commenting lines 121 & 126 in module/video/types/uploadfield/uploadfield_widget.inc will prevent the thumbnails being removed.
These two lines:
video_widget_element_settings($element);
video_widget_process($element, $form_state);
NOTE: Be careful with this, I managed to clear the 'files' table when having only one of those lines commented. So make a backup first.
This also disables making any changes to the Video CCK in the node edit screen - it only preserves the video and thumbnails ( So you can make changes to other parts of the node )
This does not fix the issue, it only prevents changes being made to the videos.
Comment #10
hypertext200Fixed is latest.
Comment #11
JoshW commentedjust installed the new dev for 6 on sept 29 2010 and images still disappear.
Comment #12
hypertext200What are the depndent modules you have?. I have no idea on how to fix this now, I changed the way I used it and hope that will work seems it didn't. send me the site that you used to create videos then I can debug and see how its working and where is the issue. we will delete thumbanils only when hook_file_delete is called, if your not deleting files at any time or updating new files, then thumbs should exits. Give me some more info.
Comment #13
zisser commentedSame here..
What kind of info would help you?
Dependent modules: content and filefield
Comment #14
hypertext200I'm really confusing about this issue, did that happen with cron run? or after upload a video?. What is the workflow you followed to upload videos?
Comment #15
zisser commentedI have uploaded an flv video (I do not use conversion) and uploaded the thumbnail image.
Later, I edited the node content (the image was in place) and saved.
After that the image was gone from the views I set (for example a slideshow I use) so when edit again the node I can see there is no image.
Thanks,
Udi
Comment #16
hypertext200I thought it was after auto-thumbnail creation. I will work on it.
Comment #17
zisser commentedsorry deleted the text... some of my issues are related to imagecache presets and content type display fields..
Comment #18
finex commentedsubscribe
Comment #19
jospBln commentedI use video without conversion and with an uploaded thumb.
Whenever I edit the node, the video module forgets the thumb and I have to upload it again.
Comment #20
JoshW commentedsame
Comment #21
peximo commentedThe problem seems to be that when saving the node form without changing the video thumb, the related submitted value is empty and the original value is not preserved. The attached patch seems to fix the issue by restoring the saved value in this case.
Comment #22
JoshW commentedJust tried the patch and its working! Thank you so much!
Comment #23
primobruno commentedDefinitely it works !!! With that litle patch, it no longer losses the thumbnails when i edit the post.
Other problems remain:
Everytime i create a post, this message shows:
The selected file could not be copied, because no file by that name exists. Please check that you supplied the correct filename.
I thought it was about the thumbnails because no automatic thumbnails are created (like they use to).
So i use a default thumbnail in case other methods fail but even that was not working till now.
Thanks for posting the patch !!!
Comment #24
3dloco commentedThanks a lot Peximo for submitting the patch! I can confirm that #21 is working for me on 6.x-4.1-rc6.
Comment #25
ericpai commentedThe patch worked for me too!
The problem is the old thumbnail is not being deleted. Is there another patch for that?
Also, the thumbnails remain in the files table after the video has been deleted.
thanks
Comment #26
virtuali1151 commentedAny update on this one....??? as I too.. out of the blue have had all of the thumbnails just deleted.. the whole video_thumbs directory is missing all of the sudden... very strange??
Comment #27
hypertext200@virtuali1151 is there any log messages on your watchdog? I need some more info digging in to this, don't this patch work for you? #21
Comment #28
virtuali1151 commentedYes.. there is.. but its just an obvious filefield error cause the images are no longer there... what strange is that if I go back in and delete the vid.. and re-upload it the video_thumbs directory comes back with a new sequential order and the thumbs are ok...
Message FileField was trying to display the file sites/default/files/video_thumbs/620/video-thumb-for-620-3.jpg, but it does not exist.
I have also just got another error on the actual videos itself... for some reason all of the sudden all videos now link to this strange directory sites/default/files/sites/default/files which is nothing I have defined... I think there is obviously two issues here... I am not sure if this one has to do with Swftools or..?? But the same thing as above.. I can delete the video and reupload it.. and it works fine.. the all of the sudden they all go to that wierd directory out of the blue...?? Not sure if you point me in the right direction.
Error:
Location http://www.site.com/sites/default/files/sites/default/files
Referrer http://www.site.com/sites/all/libraries/flowplayer3/flowplayer.commercia...
Message sites/default/files/sites/default/files
Severity warning
Hostname xx
For now I have just reuploaded the videos and hopefully thats the end of it... but if/when it goes pearshaped again I will post the watchdog so we can narrow down the problem.
Tks.
Comment #29
virtuali1151 commentedAnd one last error that seems to keep happening is it is looking for the original video to display for some reason??
FileField was trying to display the file sites/default/files/videos/original/surfboard.flv, but it does not exist.
Cheers.
Comment #30
virtuali1151 commentedWell.. Its done it yet again.. and for any of you other guys that seem to be getting the error sites/default/files/sites/default/files it looks to be an error with Swftools and Flowplayer.. we are still debuggin..I will post the issue ticket here for you guys to check later..
Cheers.
Comment #31
hypertext200In video.module file
Here is the where we delete files and thumbs when video file id deleted. Please consider about this and hope this tip will helpful.
Comment #32
parasox commentedThis has been happening to me too it seems, and tonight it happened big.. I temporarily fixed the problem by symlinking my imagecache directory that had the files to /files/video_thumbs and when I went to try and update a video, my directory got nuked and all my thumbs are gone from both imagecache and their normal place.
Woops. I'm using rc6.
I see the above patch should work on rc6, I'll try that now.
Heshan, I'd be happy to let you login to my site if you like. Just ask and I'll send a message through your contact form.
Comment #33
hypertext200Try #21, it should work. Yep contact me to provide any log info if there are any
Comment #34
parasox commentedOk great thanks. Not sure if it's the same issue, but right now I can't generate thumbnails either. It seems it's skipping the /var/www/ in /var/www/sites/default etc and so it can't find 'sites/default/files/video_thumbs/'
So right now I have no thumbs and can't make new ones.. :P Sending you the login details Heshan, maybe there's some clues there in the dblog.
Error generating thumbnail for video: generated file sites/default/files/video_thumbs/7429/video-thumb-for-7429-5.jpg does not exist.
Command Executed:
-i 'sites/default/files/original/original-video.mp4' -an -y -f mjpeg -ss 180 -vframes 1 sites/default/files/video_thumbs/7429/video-thumb-for-7429-5.jpg
Command Output:
FFmpeg version SVN-r25766, Copyright (c) 2000-2010 the FFmpeg developers built on Nov 18 2010 22:24:36 with gcc 4.4.1 configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-libfaac --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvorbis --enable-libx264 --enable-libxvid --enable-x11grab --enable-libvpx --enable-libtheora --enable-libmp3lame libavutil 50.33. 0 / 50.33. 0 libavcore 0.13. 0 / 0.13. 0 libavcodec 52.96. 0 / 52.96. 0 libavformat 52.84. 0 / 52.84. 0 libavdevice 52. 2. 2 / 52. 2. 2 libavfilter 1.62. 0 / 1.62. 0 libswscale 0.12. 0 / 0.12. 0 libpostproc 51. 2. 0 / 51. 2. 0 Seems stream 1 codec frame rate differs from container frame rate: 5994.00 (5994/1) -> 29.97 (2997/100) Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'sites/default/files/original/original-video.mp4': Metadata: major_brand : isom minor_version : 1 compatible_brands: isom Duration: 00:03:01.28, start: 0.000000, bitrate: 12267 kb/s Stream #0.0(eng): Audio: aac, 44100 Hz, stereo, s16, 273 kb/s Stream #0.1(eng): Video: h264, yuv420p, 1920x1080, 11991 kb/s, 29.97 fps, 29.97 tbr, 2997 tbn, 5994 tbc sites/default/files/video_thumbs/7429/video-thumb-for-7429-5.jpg: No such file or directory
Comment #35
virtuali1151 commentedI used the patch in #21 and reuploaded the thumbs and mine works again.. I will let you know if it errors again... Shouldnt #21 be commited patch..??
Comment #36
hypertext200Added to the dev version.
Comment #37
hypertext200Found the issue and patched it.
Comment #38
virtuali1151 commentedIs the patch #37 commited in the most recent dev version..??
Comment #39
hypertext200its available in the BETA2 and dev
Comment #40
hypertext200Comment #41
Krotty commented6.x-4.2-beta2 nothing has changed...
It looks like all video-thumbs disappear after new video node creation.
Comment #42
tacituseu commentedSame problem with 6.x-4.2-beta2 (and dev), editing a node with video field resets settings, and previewing removes thumbnail. Steps to reproduce:
1. In field configuration set 'Thumbnail Generation' to 'manual_upload' => 'Manually upload a thumbnail'
2. Select 'Video Thumbnail' formatter as a Display (just to check easilly)
3. Create a node, attach video and thumbnail, set 'Dimensions for Video Player' to a value other than default, save (without previewing first) -> thumb will show on node, devel will show choosen dimensions in field's data['player_dimensions']
4. Now edit node, notice widget preview doesn't show thumbnail (it shows default one if it is set in field configuration) also 'Dimensions for Video Player' is not preserved (is on default now), click preview, then save -> thumb is deleted and 'Dimensions for Video Player' reset, if you hit save without doing preview first you will loose only 'Dimensions for Video Player' because of a patch from #21 that restores it later in
video_widget_process().The source of the problem is inside
uploadfield_widget_value():and
array_merge()is not recursive and$item['data']is overwritten by$file['data'](or$edit['data']) and video_thumb_file, video_thumb, dimensions, player_dimensions are lost if not changed on this edit.Patch attached, also removed some redundant code.
Comment #43
hypertext200I will add this to the dev and we can test, as far as I can see this patch is good to go, thanks @tacituseu
Comment #44
virtuali1151 commentedHere we go again! This latest Dev Version is once again deleting the entire video_thumbs directory causing the videos not to play.... Can we pls find out why this is happening yet again.
Cheers.
Comment #45
parasox commentedI've lost my entire thumbnails directory at least 3 times now. Some advice.
Easiest way I've found to get them back is to hold down CTRL and left click each video (I do about 10 at a time using my /videos/ pager). Then click the first tab, move your mouse to the Edit link, click. Then hit CTRL+TAB, and click again without moving your mouse.. Keep doing that until you've clicked edit on all your tabs.
Now your server will be going apeshit running as many FFMpeg commands as it can whipping up thumbs.
Once you see all your tabs have finished loading (easy to see in Chrome because the icon stops spinning) again I go to the first tab, CTRL+TAB, END key, repeat for all tabs. Then you can CTRL+TAB and Click "Save" on all nodes without moving your mouse.
That's the fastest and easiest way I've found. Perhaps resaving all the nodes with Views Bulk Operations would work, but I haven't tried it, and I doubt it since it takes so long for thumbs to be created for each node. Maybe though.
Comment #46
hypertext200@virtuali1151, @parasox, Thanks for support on debugging module. Can you guys please provide me below information.
1. In video field, what is the thumbnails generation option you have selected? Auto creating, Fallback with manual or other?
2. How that happened? when creating a new video? or editing existing video? or on cron run
3. What are the recent watchdog commands you can see when you see such incident?
Comment #47
virtuali1151 commentedHi All,
I have reverted back to the Dec 11 Dev version and that seems to work correctly. I am not sure what actually triggers the video_thumbs folder to get deleted. In the watchdog all that comes up is that is that filefield cannot display the video thumb image, thus flowplayer throws the sites/default/files/sites/default/files error.
Not sure if that helps.
Cheers.
Comment #48
tacituseu commentedThis happens when
video_file_delete()gets called without properly initialized object, eg. someone does something equivalent tofield_file_delete(NULL);. It will degrade tormdirr(file_directory_path() . '/' . $video_thumb_path . '/');and delete all files in /video_thumbs. Attached patch will prevent it, also adding some logging ('hook_file_delete called with empty $file object' in watchdog with name of the file to which stack has been dumped) to catch a culprit.Comment #49
parasox commentedWow thanks Tacituseu, hope this kills the problem! Is this patch based on the latest dev or?
And welcome to Drupal, nice contribution for your first 2 weeks here. :) Thanks!
Comment #50
hypertext200Added to the dev. Please post the debug information
Comment #51
virtuali1151 commentedI will try out and see what comes of it as well... Tks all! :)
Comment #52
tacituseu commentedJust a note to the patch above, on a production site (with only files dir writable by the web server) it should be something like:
$dump_file = file_create_path('video-debug-'.time().'.log');otherwise it will try to create it in Drupal's root dir.
Comment #53
hypertext200Comment #54
virtuali1151 commentedNo Prob tacituseu.. I have put it up today and will advise of any errors etc. Tks again.
Cheers.
Comment #55
tacituseu commentedJust noticed that user triggered it a while ago, see #1125368: hook_file_delete() called without valid $file object for details.
Comment #56
justingeeslin commentedI updated my Video module to 4.2 and FieldField to the latest version. And my video_thumbs stopped being deleted. Excellent!
Comment #58
dman commentedSorry for the bump, but this thread is the most relevant.
As in # 52 - the video-debug log file in 6.x-4.x today still tries to dump debug information by writing to the root dir.
This cannot be right.
I also found that this error (hook_file_delete called with empty $file object) is being thrown for ANY file deletion (eg a normal image field), so I would have expected the video file handler to take care and only get involved if the file being deleted was one of its own, even despite the larger #1125368: hook_file_delete() called without valid $file object issue that triggers it. Why is video claiming management of files that are not its own?
On the plus side, the debug backtrace it left in that dump file enabled be to trace this issue to its source! (but by the gods, why serialized? That was eye-strain!)
Comment #59
Jorrit commentedThe issues you raise are valid, but it is better to open a new issue instead of reopening an issue that has been closed for half a year. You should then point to this issue and mention why the issue was not fixed.
Comment #60
dman commentedFair call.
At the time I found this today we were in the middle of a realtime go-live upgrade release with a dozen threads in the air, with PM + client breathing down my neck.
Was not on a -dev checkout so wasn't able to roll a clean patch, and just needed to answer why there were extra files in the root of the live site that we hadn't expected to see from the dev site.
Needed to make a quick note so we could come back to it later, and the history on this thread is the most relevant to track. I'll see if a small patch can be done in a new issue..
Comment #61
tacituseu commentedThe code wasn't intended to leave dev branch.
would do.
So you could do
krumo(unserialize(file_get_contents('video-debug-x')))without straining anything ;)Comment #62
dman commentedSo I'm looking at our codebase (6.x.4.4), and it's probably not worth trying to roll a testable patch for you due to how far behind we are.
If it's just dev-only debug code, I'll let you clean it up in the current branch in whatever way fits.
@tacituseu :-B
Yeah, so it is not entirely impossible to bootstrap php from the commandline, remember the correct flags and include a library, and formulate a line of code that would decrypt the obfuscated dump file. I could also ROT13 it twice while I'm at it.
I still don't quite see the advantage of doing that over, y'know, being able to open it with a text editor or running
cat strange_log_file.txt.Is there like some deliberate useful advantage on encoding it? to save 15% disk space or something?
The really scary thing was I was actually able to scan that encoded wall of serialization and read what it was telling me in the raw! It made me feel like a freak to be able to do that :-}
Comment #63
tacituseu commented@dman
You can download it to your dev machine, or is FTP a strain too ? ;)
The only reason was krumo-friendliness.
Comment #64
Jorrit commentedI'll remove the file reference asap. I should have done this earlier after taking over the code base.
Comment #65
Jorrit commentedThe debug info has been removed in 6.x-4.x.