Whenever I try to set the dimensions either inside the CCK field for the video setup or when creating new nodes it will error out with: An illegal choice has been detected. Please contact the site administrator.

I've tried both 4.x versions of the module and a default theme. I've tried matching the dimension settings to what I uploaded as well and still gave this error.

Comments

iLLin’s picture

I have seen this from time to time, if you can reproduce it consistently can you troubleshoot it too? I cannot reproduce that error and when I have seen it, it goes away. I think its a problem with the widget form settings.

DaveReed’s picture

From what I can tell this seems like a CCK issue, I will try updating cck and post my findings.

dmurray’s picture

Same issue here with both the dev and beta release.

negentropy’s picture

I am experiencing the same problem. From searching for information, I've noticed that this generic error messages seems to affect all kinds of modules but often goes unfixed and is often difficult to replicate.

I noticed something very bizarre this morning. Fed up, I switched from my web development optimized installation of Firefox (version 3.6.3, loaded with add-ons) and tried to administrate through my vanilla installation of Opera (version 10.53) and received no error. The error persists with Firefox, but Opera seems immune (I have not tried other browsers). This seems very odd to me, but it's quite clear that at least one of my many add-ons is breaking the form or its submission (although I haven't tried a vanilla installation of Firefox, nor have I gone through the exercise of identifying which add-ons cause the problem, nor do I plan to do either).

If you're having this problem, try switching to a different browser, Opera 10.53 worked for me, and see if you can get past the issue. I hope it works for you. That said, I think that “don't use Firefox or its many add-ons” is a really unsatisfying fix to this issue, especially because it's one thing for me to know to switch browsers but quite another for visitors to a site to do this, not to mention the fact that this issue has been resolved in other modules.

hypertext200’s picture

Assigned: Unassigned » hypertext200
Status: Active » Fixed

Fixed in latest build.

iLLin’s picture

Let me know if this issue still persists as I reverted some stuff back.

dmurray’s picture

Yes looks like the error is gone but seems to be some new ones now when adding a video

warning: pg_query() [function.pg-query]: Query failed: ERROR: value too long for type character varying(16) in /var/vwww/video.ux-flux.ca/html/includes/database.pgsql.inc on line 139.
user warning: query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (1, 'video_ffmpeg_wrapper', 'Sending options: -i ''sites/default/files/videos/MOV06553.MPG'' -an -y -f mjpeg -ss -0.8 -vframes 1 sites/default/files/video_thumbs/11/video-thumb-for--1.jpg', 'a:0:{}', 7, '', 'http://video.ux-flux.ca/node/add/video', 'http://video.ux-flux.ca/node/add/video', '71.7.197.94', 1275438754) in /var/vwww/video.ux-flux.ca/html/modules/dblog/dblog.module on line 147.
warning: pg_query() [function.pg-query]: Query failed: ERROR: value too long for type character varying(16) in /var/vwww/video.ux-flux.ca/html/includes/database.pgsql.inc on line 139.
user warning: query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (1, 'video_ffmpeg_wrapper', 'Sending options: -i ''sites/default/files/videos/MOV06553.MPG'' -an -y -f mjpeg -ss -0.6 -vframes 1 sites/default/files/video_thumbs/11/video-thumb-for--2.jpg', 'a:0:{}', 7, '', 'http://video.ux-flux.ca/node/add/video', 'http://video.ux-flux.ca/node/add/video', '71.7.197.94', 1275438754) in /var/vwww/video.ux-flux.ca/html/modules/dblog/dblog.module on line 147.
warning: pg_query() [function.pg-query]: Query failed: ERROR: value too long for type character varying(16) in /var/vwww/video.ux-flux.ca/html/includes/database.pgsql.inc on line 139.
user warning: query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (1, 'video_ffmpeg_wrapper', 'Sending options: -i ''sites/default/files/videos/MOV06553.MPG'' -an -y -f mjpeg -ss -0.4 -vframes 1 sites/default/files/video_thumbs/11/video-thumb-for--3.jpg', 'a:0:{}', 7, '', 'http://video.ux-flux.ca/node/add/video', 'http://video.ux-flux.ca/node/add/video', '71.7.197.94', 1275438755) in /var/vwww/video.ux-flux.ca/html/modules/dblog/dblog.module on line 147.
warning: pg_query() [function.pg-query]: Query failed: ERROR: value too long for type character varying(16) in /var/vwww/video.ux-flux.ca/html/includes/database.pgsql.inc on line 139.
user warning: query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (1, 'video_ffmpeg_wrapper', 'Sending options: -i ''sites/default/files/videos/MOV06553.MPG'' -an -y -f mjpeg -ss -0.2 -vframes 1 sites/default/files/video_thumbs/11/video-thumb-for--4.jpg', 'a:0:{}', 7, '', 'http://video.ux-flux.ca/node/add/video', 'http://video.ux-flux.ca/node/add/video', '71.7.197.94', 1275438755) in /var/vwww/video.ux-flux.ca/html/modules/dblog/dblog.module on line 147.
warning: pg_query() [function.pg-query]: Query failed: ERROR: value too long for type character varying(16) in /var/vwww/video.ux-flux.ca/html/includes/database.pgsql.inc on line 139.
user warning: query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (1, 'video_ffmpeg_wrapper', 'Sending options: -i ''sites/default/files/videos/MOV06553.MPG'' -an -y -f mjpeg -ss 0 -vframes 1 sites/default/files/video_thumbs/11/video-thumb-for--5.jpg', 'a:0:{}', 7, '', 'http://video.ux-flux.ca/node/add/video', 'http://video.ux-flux.ca/node/add/video', '71.7.197.94', 1275438755) in /var/vwww/video.ux-flux.ca/html/modules/dblog/dblog.module on line 147.
dmurray’s picture

After these messages all that is displayed on the node is

This video is currently being processed. Please wait.

But it's never processed.

dmurray’s picture

This error is displayed if you select convert on save

warning: Division by zero in /var/vwww/video.ux-flux.ca/html/sites/all/modules/video/includes/conversion.inc on line 172.
warning: Division by zero in /var/vwww/video.ux-flux.ca/html/sites/all/modules/video/includes/conversion.inc on line 177.
Something went wrong with your video conversion. Please check your recent log entries for further debugging.
dmurray’s picture

This error is displayed if using ffmpeg wrapper opposed to ffmpeg

warning: pg_query() [function.pg-query]: Query failed: ERROR: value too long for type character varying(16) in /var/vwww/video.ux-flux.ca/html/includes/database.pgsql.inc on line 139.
user warning: query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (1, 'video_ffmpeg_wrapper', 'Sending options: -i ''sites/default/files/videos/original/MOV06553_0.MPG'' -s 7 -vcodec mpeg4 -b 250k -r 25 ''sites/default/files/videos/converted/MOV06553_0.flv''', 'a:0:{}', 7, '', 'http://video.ux-flux.ca/node/add/video', 'http://video.ux-flux.ca/node/add/video', '71.7.197.94', 1275439592) in /var/vwww/video.ux-flux.ca/html/modules/dblog/dblog.module on line 147.
warning: filesize() [function.filesize]: stat failed for sites/default/files/videos/converted/MOV06553_0.flv in /var/vwww/video.ux-flux.ca/html/sites/all/modules/ffmpeg_wrapper/ffmpeg_wrapper.module on line 957.
Something went wrong with your video conversion. Please check your recent log entries for further debugging.
iLLin’s picture

Yea I was just looking at that, You are using 2.x-dev right?

iLLin’s picture

http://drupal.org/cvs?commit=374258

This commit shortens the value of the watchdog 'type'. I don't have postgres installed but I think this error is when you try to add a value that exceeds the length of 16... duh right? Well I shortened it, let me know if that fixes your query error problem. MySQL just truncates the value to the length of 16... bad coding on my part.

The divide by zero is another issue. I am thinking that ffmpeg was not able to extract the dimensions from the video you tried to upload. That being said, I need a fallback to prevent it from continuing and throwing errors. That function is kinda wicked... It basically finds out the aspect ratio and the WxH your converting too, and then pads the sides and top accordingly with black bars to maintain the video's aspect ratio to prevent cropping and stretching. It took me a while to get that right so I don't doubt if its wrong =), too much math... Anyway it doesn't have any start dimensions so... how do we handle that? Just check for dimensions and if none return? But it needs some dimensions which I don't understand as those dimensions should be pulled from the dropdown when uploading... Hmmm. Try to grab CVS from Head and see if those errors are gone as I had to revert files earlier today and I think I fixed this issue when doing that... Maybe? hahahah, let me know.

dmurray’s picture

downloaded the head from the cvs

cvs -z6 -d:pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal-contrib checkout contributions/modules/video

---------------------

I enabled:
Video
Video ffmpeg Helper
Upload Video

---------------------

Went to:
/node/add/video/upload

---------------------

This is where I get stuck because I choose a file to upload then hit save, then it bounces back to the node edit page and says that a resolution must be selected bu there is no options in the dropdown to select so I can't go any further.

I downloaded the latest dev version as well and tried to create a node but got a different error

warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'video_upload_admin_settings' was given in /var/vwww/video.ux-flux.ca/html/includes/form.inc on line 372.
iLLin’s picture

Go to the admin video settings page.

admin/settings/video/metadata

This is where your dropdown options are created. If the textarea that is there is empty, just press restore to defaults to make sure its reset to the default resolutions. IF there is options there, tell me what they are... just seems weird there is no options in the dropdown.

iLLin’s picture

Also I did a search for "video_upload_admin_settings" and could not find that text anywhere. What module is that from?

dmurray’s picture

Ok so this is with the latest cvs version.

(theres no menu entry for /admin/settings/video/metadata)

I created a resolution (400x640) and now it shows up in the drop down. I selected a video and saved the node edit for but now these errors appear.

warning: pg_query() [function.pg-query]: Query failed: ERROR: relation "video" does not exist in /var/vwww/video.ux-flux.ca/html/includes/database.pgsql.inc on line 139.
user warning: query: INSERT INTO video (vid, nid, vtype, vidfile, size, videox, videoy, video_bitrate, audio_bitrate, audio_sampling_rate, audio_channels, playtime_seconds, disable_multidownload, download_folder, use_play_folder, serialized_data) VALUES (8, 8, 'upload', '', 513627, 640, 400, 0, 0, 0, '', 0, 1, '', 0, 'a:1:{s:9:"video_fid";s:2:"14";}') in /var/vwww/video.ux-flux.ca/html/sites/all/modules/video/video.module on line 768.
warning: pg_query() [function.pg-query]: Query failed: ERROR: column "sites/default/files/videos/MOV06553_0.MPG" does not exist LINE 1: ...e, pid, status, started, completed) VALUES (8, 8, "sites/def... ^ in /var/vwww/video.ux-flux.ca/html/includes/database.pgsql.inc on line 139.
user warning: query: INSERT INTO video_rendering (vid, nid, origfile, pid, status, started, completed) VALUES (8, 8, "sites/default/files/videos/MOV06553_0.MPG", 0, 1, 0, 0) in /var/vwww/video.ux-flux.ca/html/sites/all/modules/video/plugins/video_ffmpeg_helper/video_ffmpeg_helper.module on line 342.
warning: pg_query() [function.pg-query]: Query failed: ERROR: relation "video" does not exist in /var/vwww/video.ux-flux.ca/html/includes/database.pgsql.inc on line 139.
user warning: query: UPDATE video SET vidfile = "busy.flv" WHERE nid=8 AND vid=8 in /var/vwww/video.ux-flux.ca/html/sites/all/modules/video/plugins/video_ffmpeg_helper/video_ffmpeg_helper.module on line 348.
warning: pg_query() [function.pg-query]: Query failed: ERROR: relation "video" does not exist in /var/vwww/video.ux-flux.ca/html/includes/database.pgsql.inc on line 139.
user warning: query: SELECT * FROM video WHERE vid = 8 in /var/vwww/video.ux-flux.ca/html/sites/all/modules/video/video.module on line 812.
warning: pg_query() [function.pg-query]: Query failed: ERROR: relation "video" does not exist in /var/vwww/video.ux-flux.ca/html/includes/database.pgsql.inc on line 139.
user warning: query: UPDATE video SET play_counter = play_counter + 1 where vid = 8 in /var/vwww/video.ux-flux.ca/html/sites/all/modules/video/video.module on line 1069.
dmurray’s picture

Heres the info for the "video_upload_admin_settings"

Type	php
Date	Tuesday, June 1, 2010 - 23:33
User	dmurray
Location	http://video.ux-flux.ca/admin/settings/video/upload
Referrer	http://video.ux-flux.ca/admin/build
Message	call_user_func_array() [<a href='function.call-user-func-array'>function.call-user-func-array</a>]: First argument is expected to be a valid callback, 'video_upload_admin_settings' was given in /var/vwww/video.ux-flux.ca/html/includes/form.inc on line 372.
Severity	error
Hostname	XXXXXXXX
Operations	
iLLin’s picture

I don't know what module this is, but this is not 4.x-dev. There is no table video. There is a menu entry for metadata. Not sure what happend with your install?

dmurray’s picture

Weird, I downloaded the and reinstalled the latest dev version on a new install and the menu entry is there now but once again I'm getting the message:

An illegal choice has been detected. Please contact the site administrator.
iLLin’s picture

I just committed some trimming functions around the options. Is there a dimensions select dropdown? That error happens when the form build doesn't not match the form that is submitted. It's like the options are not holding or are changing between form build and form submit.

dmurray’s picture

Yeah there is are dimensions in the drop down. There's 28 of them in there.

roneill’s picture

Using: 6.x-4.x-dev 2010-Jun-02
========================

Dimension for player: drop down works, but not if you edit the list through Home › Administer › Site configuration › Video > Metadata.

If you add a dimension to the list it will then only let you select the last entry in the list. Otherwise it will display the 'An illegal choice has been detected. Please contact the site administrator' Error. Must be something to do with the way the array is serialized when edited?

Also. Resolution seems to be completely ignored now. A couple of days ago if you selected e.g. 1280x720 (Matches resolution) it would encode to that size. Now it just seems to do one size only?

Be great to get these issues cleared up. Thanks again for such an excellent module. Will to continue to test the dev.

iLLin’s picture

Fixed the width and height issues.

http://drupal.org/cvs?commit=374608

I can't duplicate this error you are getting. Can you copy and paste your select options on the metadata page for me.

iLLin’s picture

Priority: Normal » Critical
Status: Fixed » Active
iLLin’s picture

Assigned: hypertext200 » iLLin
dmurray’s picture

I can confirm that this issue (WxH) has been fixed with video 6.x-4.x-dev from June 2, 2010 - 21:20

roneill’s picture

Using 6.x-4.x-dev 2010-Jun-03
=======================

As stated above WxH issues are fixed. Also WxH dimensions added via the metadata page are NOT producing the 'An illegal choice has been detected. Please contact the site administrator' error anymore. All seems to be behaving as expected :-) Thank you.

iLLin’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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

maddy121’s picture

I have started having the same problem. The video default selector drop down menu in cck is not showing any selection values. I'm using 6.x-4.1-rc6.

hypertext200’s picture