Error during installation

ArtAnna - February 19, 2009 - 10:01
Project:Web File Manager
Version:6.x-2.10-rc4
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:closed
Description

I try to install WFM to clean drupal 6.9 & get this error

user warning: BLOB/TEXT column 'fdesc' can't have a default value query: CREATE TABLE webfm_file ( `fid` INT unsigned NOT NULL auto_increment, `uid` INT unsigned NOT NULL DEFAULT 0, `fpath` MEDIUMTEXT NOT NULL, `fsize` INT unsigned NOT NULL DEFAULT 0, `fmime` VARCHAR(255) NOT NULL DEFAULT '', `ftitle` VARCHAR(255) NOT NULL DEFAULT '', `fdesc` TEXT NOT NULL DEFAULT '', `fcreatedate` INT NOT NULL DEFAULT 0, `flang` VARCHAR(255) NOT NULL DEFAULT '', `fpublisher` VARCHAR(255) NOT NULL DEFAULT '', `fformat` VARCHAR(255) NOT NULL DEFAULT '', `fversion` INT NOT NULL DEFAULT 0, `perm` TINYINT NOT NULL DEFAULT 0, `dl_cnt` INT NOT NULL DEFAULT 0, PRIMARY KEY (fid) ) /*!40100 DEFAULT CHARACTER SET UTF8 */ in C:\www-root\d69\includes\database.inc on line 515.

I have MySql 5.0.51a and never get such kind of errors before.

#1

robmilne - February 19, 2009 - 12:06

Try replacing the following line...
'fdesc' => array('type' => 'text', 'size' => 'normal', 'not null' => TRUE, 'default' => ''),
...with
'fdesc' => array('type' => 'text', 'not null' => TRUE),
...inside webfm.install

#2

mas160 - July 2, 2009 - 12:57

Same.
Change suggested by robmilne will lead in later issue when i try to update metadata without entering a file desc ('column fdesc have no default').
Solved changing...
'fdesc' => array('type' => 'text', 'size' => 'normal', 'not null' => TRUE, 'default' => ''),
with
'fdesc' => array('type' => 'text', 'size' => 'normal', 'not null' => FALSE),
Hope helps.

#3

mas160 - July 9, 2009 - 12:06
Status:active» needs review

Added:

  if(!isset($metadata['fdesc']))
    $metadata['fdesc'] = '';

just below line 2412 in webfm.module.

Tried in my installation (intranet app) seems OK

#4

robmilne - July 20, 2009 - 21:22

Yes. I have had this in my code for some time now but did not commit.

#5

robmilne - July 22, 2009 - 05:15
Status:needs review» fixed

See rc5

#6

System Message - August 5, 2009 - 05:20
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.