I receive the following error while uploading a pdf file, I checked mysql and the field description is marked as NOT NULL

Field 'fdesc' doesn't have a default value query: INSERT INTO webfm_file (fpath, uid, fsize, fcreatedate, perm, fmime) VALUES ('files/media/pdf/jbc_symbolen_nl.pdf', 5, 259921, 1234289275, 1, 'application/pdf') in E:\sites\drupal6\jbc\sites\all\modules\webfm\webfm.module op regel 2663.

Comments

robmilne’s picture

This field seems to be constantly causing me grief. The versions of mysql I'm using never complain.
See http://drupal.org/node/327993 for another instance of this issue

Try adding these lines to the webfm_dbinsert_file function in webfm.module (after line #2369 of rc4) and let me know if it fixes the problem.

  if(!isset($metadata['fdesc']))    
    $metadata['fdesc'] = ''; 
attiks’s picture

Rob,

I just changed my DB so description can be NULL, but looking at your solution this will fix it.

attiks’s picture

Rob,

I tested this on a clean install using RC4 and #2 fixes the problem.

nhck’s picture

Status: Active » Closed (fixed)