2017-11-20 05:25 PST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0000201v1.1 Release (Closed)[All Projects] Generalpublic2009-09-09 22:39
ReporterMiraKlim 
Assigned Tocaseydk 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
Product Version 
Target VersionFixed in Version1.1 
Summary0000201: Unable to upload file in files module
DescriptionIt is impossible to upload any file to web2project.
This is problem of file_checkout field in files table. This field is "not null" and doesn§t have default value. Under MYSQL "strict" configuration this causes an error - see in additional information.
In MySQL manual I found following explanation:
MySQL 5.0 and higher have a strict mode. The Windows Installer from MySQL.com enables this strict mode by default.
Additional InformationError message:
query failed(INSERT INTO `files`(`file_version_id`,`file_real_filename`,`file_name`,`file_description`,`file_type`,`file_owner`,`file_date`,`file_size`,`file_version`,`file_category`,`file_folder`,`file_helpdesk_item`) VALUES (1,'92474a54ecca23d48','XP_inst.txt','sdanfadsf','text/plain','2','2009-07-08 21:00:26',712,'1','0','0','1')) - error was: Field 'file_checkout' doesn't have a default value
TagsNo tags attached.
Attached Files

-Relationships
+Relationships

-Notes

~0000346

joe (reporter)

Last edited: 2009-07-21 06:28

This can be fixed on the MySQL side by going in to the my.ini in the MySql root directory.

change this line:
# Set the SQL mode to strict
sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
To:
# Set the SQL mode to strict
sql-mode="NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
then resart the service

This will however disable error checking on dates i.e. you can input a month of 13.

there are several other places that a datetime does not have a default value (2 that I have seen in the contacts module), if you wanted to correct it in the code.

~0000360

caseydk (administrator)

After some digging into this, I've determined that it only happens on new installations, not conversions from dotProject. While still not good, it's better than it could be.


The proper way of resolving this one is to run this command:

ALTER TABLE `files` CHANGE `file_checkout` `file_checkout` VARCHAR(16) NOT NULL DEFAULT '';

I've already written an update script - to be included in v1.1 - that will automatically apply this. This was committed in r537.

~0000441

caseydk (administrator)

Closed for release.
+Notes

-Issue History
Date Modified Username Field Change
2009-07-08 12:07 MiraKlim New Issue
2009-07-12 05:08 caseydk Project Pending Requests => v1.1 Release (Closed)
2009-07-21 06:28 joe Note Added: 0000346
2009-07-21 06:28 joe Note Edited: 0000346
2009-07-28 21:15 caseydk Status new => resolved
2009-07-28 21:15 caseydk Resolution open => fixed
2009-07-28 21:15 caseydk Assigned To => caseydk
2009-07-28 21:15 caseydk Note Added: 0000360
2009-09-09 22:39 caseydk Status resolved => closed
2009-09-09 22:39 caseydk Note Added: 0000441
2009-09-09 22:39 caseydk Fixed in Version => 1.1
+Issue History