I am using Drupal 5.1 with Postgresql 8.2. I have created a custom content type with a video field. When I try to create some content using the new content type, I get the errors/warnings below when I click the submit button:
* warning: pg_query() [function.pg-query]: Query failed: ERROR: invalid input syntax for integer: "" in /Volumes/Mac_Data/engelsma_us/drupal/includes/database.pgsql.inc on line 125.
* user warning: query: INSERT INTO content_type_video_entry (field_video_file_fid, field_video_file_fileformat, field_video_file_videox, field_video_file_videoy, field_video_file_bits_per_sample, field_video_file_videocodec, field_video_file_audiocodec, field_video_file_sample_rate, field_video_file_channel_mode, field_video_file_playtime, vid, nid) VALUES (25, 'quicktime', '', '', NULL, NULL, 'ISO/IEC 14496-3 AAC', 44100, 'stereo', '8:36', 67, 41) in /Volumes/Mac_Data/engelsma_us/drupal/includes/database.pgsql.inc on line 144.
Does media field work with Postgresql as the database server? I've attached a screenshot showing the error as well.
Thanks for your help!
| Comment | File | Size | Author |
|---|---|---|---|
| Screenshot_3.jpg | 305.94 KB | engelsma |
Comments
Comment #1
engelsma commentedThe getID3() library seems to be having trouble determining the horizontal and vertical resolution (i.e. size) of the video. The video I've been trying to post is a Quicktime .mov file encoded with the H264 video codec and the AAC audio codec.
If I create content with .wmv files, there is no problem.
Comment #2
suzanne.aldrich commentedI am also have database troubles, using PostgreSQL, and trying to add an audio field to my blog content type:
Comment #3
suzanne.aldrich commentedOK I tried attaching a video to a blog entry, and got db errors just like the initiator of this issue:
Comment #4
suzanne.aldrich commentedOK I downgraded from the -dev version to the latest release, and got the same kind of warning, and a site that wouldn't load until I deleted the video file field I had added to my blog content type:
Comment #5
xykon commentedThe error of #2 is due to the fact that the datatype of bitrate is defined as 'float unsigned', which is a
mysql only datatype. I've changed it to the standard sql datatype 'real' and now it works for my
postgresql db. I have not tested it with mysql, but it should work there too.
Note: This will break existing audiofields, if applied on a working mysql db.
A solution might be to provide two different 'database columns' setups for postgres and mysql.
Comment #6
stormsweeper commentedA better option would be:
'bitrate' => array('type' => 'float', unsigned => TRUE, 'not null' => FALSE),The "real" type isn't handled by cck, so it'll do things like use strings and let your db do the conversions. The unsigned flag will be ignored for pgsql, since postgres doesn't have native unsigned types (Drupal creates unsigned integer types on install). If it's critical that negative values don't get saved here, it would be best to add that to the validation code, really.
Comment #7
jgumpert commentedI'm having the same issue - I've tried uploading EXE, SWF, WMV, and AVI videos to my video field and they all populate the "Video" column of the content creation page with ",x,,". Could this be a Windows-specific issue? Then when I submit the form, it is the predictable database error message:
I fixed my getid3 errors earlier and the file formats are even recognized with accurate icons for some of these formats.
Comment #8
a_c_m commentedI've just taken over maintainer of this module , this is a very old issue, if its still a problem let me know and I will take a look - otherwise please close it. No updates for 2 week = i close it.
Comment #9
a_c_m commented