Posted by brycesenz on February 17, 2010 at 3:02am
Jump to:
| Project: | Web File Manager |
| Version: | 6.x-2.12 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
I just installed the WebFM module onto my site, and checked out the Schema status shortly after install. I received the following error:
"webfm_file.fdesc is type text and may not have a default value"
I've also attached a screenshot which may yield more information. I'm hesitant to continue using this module without better understanding the implications of this error.
Any help would be greatly appreciated.
| Attachment | Size |
|---|---|
| webfm schema issue.JPG | 53.23 KB |
Comments
#1
I solved this, though I'm not sure if I created another problem through this "solution":
In the webfm.install file, I went to the webfm_schema() function, and changed this line -
'fdesc' => array('type' => 'text', 'size' => 'normal', 'not null' => TRUE, 'default' => ''),
to
'fdesc' => array('type' => 'text', 'size' => 'normal', 'not null' => TRUE),
#2
I didn't get this error with my MySQL version 5.0.51a under linux, but I found some hints that this behaviour might cause the mentioned problems in other versions and/or on other platforms, see http://bugs.mysql.com/bug.php?id=19498.
The suggested modification by brycesenz in #1 solves this problem properly (it doesn't cause problems as in the module file webfm.module (webfm-6.x-2.11) the value of field fdesc is set to the value '' if it would be NULL before an INSERT into the webfm_file table - a default for this field is never necessary).
#3
#355678: Cannot install webfm due to table creation error
#4
As of version 6.x-2.12
The line is 'fdesc' => array('type' => 'text', 'not null' => TRUE)
and so the problem is not the declaration of a null default, but rather the missing 'size' value
Replaced with
'fdesc' => array('type' => 'text', 'size' => 'normal', 'not null' => TRUE)
as explained by others above and I was able to uninstall and reinstall without any problems
#5
Thank you for reporting and following up on this. The change is commited to CVS.
#6
Automatically closed -- issue fixed for 2 weeks with no activity.