Closed (fixed)
Project:
Video
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
24 Mar 2011 at 12:13 UTC
Updated:
20 Sep 2011 at 09:44 UTC
Jump to comment: Most recent file
When I visit the video node I see the following warning:
Warning: array_flip() [function.array-flip]: Can only flip STRING and INTEGER values! in DrupalDefaultEntityController->load() (line 178 of /includes/entity.inc).
| Comment | File | Size | Author |
|---|---|---|---|
| #28 | video-field-file-load-1103942-28.patch | 2.34 KB | silvio |
| #19 | video-field-file-load.patch | 783 bytes | mrfree |
Comments
Comment #1
Aeternum commentedI can confirm this issue. It happened after my first attempt at uploading a video and was followed with an SQL error on Microsoft SQL Server Express:
PDOException: SQLSTATE[22018]: [Microsoft][SQL Server Native Client 10.0][SQL Server]Conversion failed when converting the nvarchar value 'Remove' to data type int.: SELECT base.fid AS fid, base.uid AS uid, base.filename AS filename, base.uri AS uri, base.filemime AS filemime, base.filesize AS filesize, base.status AS status, base.timestamp AS timestamp FROM {file_managed} base WHERE ( (base.fid IN (:db_condition_placeholder_0_fid, :db_condition_placeholder_0_upload_button, :db_condition_placeholder_0_remove_button, :db_condition_placeholder_0_upload)) ); Array ( [:db_condition_placeholder_0_fid] => 0 [:db_condition_placeholder_0_upload_button] => Upload [:db_condition_placeholder_0_remove_button] => Remove [:db_condition_placeholder_0_upload] => ) in DrupalDefaultEntityController->load() (line 196 of D:\inetpub\wwwroot\drupal7\includes\entity.inc).A debug_backtrace shows it originates from the Video module, by generating an array that cannot be flipped.
Comment #2
hypertext200@Aeternum , to reproduce let me know the process u followed.
Comment #3
timothykc commentedsubscribed. No SQL error for me, but getting identical error message "Warning: array_flip() [function.array-flip]:..." after uploading a video and then viewing node.
Comment #4
hypertext200What are the your configurations on field? did you select video thumbnail auto creation? did u upload a default video thumbnail image?
Comment #5
anglo commentedPosted all settings below.
Comment #6
hypertext200Marking as duplicate #1107534: Error after adding to a blog
Comment #7
antonyanimator commentedsubscribing
Comment #8
antonyanimator commentedModule does not work at all for me because of this, cannot even upload a video
Comment #9
vlamor commentedStandard configuration of the Video field. The same errors...
Comment #10
hypertext200Please send me your configurations? What are the configurations you have for the field? Enabled the auto conversion? Thumbnail creation method? provide more details to reproduce
Comment #11
anglo commentedVideo node settings
Required field: Checked
Allowed file extensions: mp4, ogg, avi, mov, wmv, flv, ogv, webm, 3gp
File directory: videos/original
Maximum upload size: Not set
Default Video Resolution Dimensions: 640x480
Progress indicator: Bar with progress meter
Default Video Player Dimensions: 320x240
Number of values: 1
Upload destination: Public files
Enable video conversion: Checked
Thumbnail Generation: Automatically generate thumbnails
Default video thumbnail: Not set
Preview thumbnail style: thumbnail
Video node edit page
Bypass auto conversion: Unchecked
Convert video on save: Checked
Use the default thumbnail for this video?: Unchecked
General
Automatically start video on page load: Unchecked
Automatically start video buffering: Checked
Bypass video conversion: Unchecked
Video convert on node submit: Checked
Override video thumbnails with default thumbnail: Unchecked
Publish when conversion complete: Unchecked
Transcoders
Locally Installed Transcoders
Enable the use of nice when calling the command.: Checked
Path to save thumbnails: videos/thumbnails
Number of thumbnails: 1
Save all thumbnails in {file_manged} table: Unchecked
FFMPeg Padding method: Use -padtop, -padbottom, -padleft, -padright for padding
Manage preset
Use preset WxH for video conversion.: Checked
Comment #12
vlamor commentedI have the same settings... And the same error...
Comment #13
hypertext200In which page u get this notice? Node edit, Play video? or where?
Comment #14
anglo commentedWhen I visit the video node page. (View video node page)
Comment #15
naterockhold commentedAlso having the same issue.
Comment #16
zamir commentedI have the same error!
Comment #17
mrfree commentedsubscribe, I see that warning message everywere... front page too
Comment #18
mrfree commentedAnother, I hope useful, info... that warn message appears twice for each published node that contains video.
If I have 2 published node w/ video published I have 4 array_flip() [function.array-flip]: Can only flip STRING and INTEGER values! message in the front page, If I remove one of them from publishing I have only 2 array_flip() warning messages on the front page
Comment #19
mrfree commentedI've found (and I hope squashed) that bug... but please review the attached patch to check if I got that file_load() logic correctly.
Comment #20
mrfree commentedComment #21
vood-1 commentedErrors disappear, nice :) Did not test it well, but looks ok
Comment #22
hypertext200Added to the dev
Comment #23
vanrijnr1 commentedHi,
I've got the same issue. Same error, with 'line 178 of /includes/entity.inc' and same for line 354.
Not sure how to use that patch, where to put it, as I'm still learning...
Roy
Comment #24
livemedialab commentedYesterday i've installed video module and got the same issue.
After a long research i found this thread and applied the patch above, so the problem eclipsed!
Thanks alot mrfree :)
I will keep on eye if everything went fine and if the problem re-appear.
Comment #25
anglo commentedComment #26
andrezyk commentedWith the patch from #19, the errors stopped for me also!
Thanks mrfree!
Comment #28
silvio commentedI get the same error after saving a node without thumbs when ffmpeg can't generate images from the uploaded video. This happens even with the patch from #19. The attached patch (also available here) fixes the problem.
The fix for my issue is the diff from video.module. The changes at video.field.inc are most intended to keep this kind of check uniform along the module.
Comment #29
nemo_Anhoa commentedDoes this patch apply for the 7.x-1.0-alpha2 ?
I try the patch for this version , but it failed.
Do I have to update to the latest 7.x-2-dev ?
Many thanks in advance,
Comment #30
interx commented#29 works (against 7.x-1.x-dev)
Comment #31
gagarine commented#29 work for me too
Comment #32
hypertext200Comment #33
gatsby0121 commented@nemo_Anhoa did you ever get it working for 7.x-1.0-alpha2?