View Issue Details

IDProjectCategoryView StatusLast Update
0007248mantisbtattachmentspublic2015-05-11 11:17
Reporterrulaan Assigned Tovboctor  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionunable to reproduce 
Product Version1.0.3 
Summary0007248: file upload to disk (via 'report issue') not possible
Description

APPLICATION ERROR 0000401
Database query failed. Error received from database was 0001400: ORA-01400: cannot insert NULL into ("MANTIS"."MTS_BUG_FILE"."CONTENT") for the query: INSERT INTO mts_bug_file
(bug_id, title, description, diskfile, filename, folder, filesize, file_type, date_added, content)
VALUES
(1, '', '', 'E:\Mantis_files\test\revision101\556f292d70e4548eeb443f3079c0a3ec', 'bcd111.zip', 'E:\Mantis_files\test\revision101\', 535503, 'application/x-zip-compressed', TO_DATE('2006-06-30, 01:22:12 PM','RRRR-MM-DD, HH:MI:SS AM'), '')

Additional Information

using Mantis 1.0.3 / Apache 2.0.58 / PHP 5.1.4 / Oracle DB 9.0.2.7 / Win2k3

The file is placed in the coorect dir, but geristering in the DB fails. Apparently there is no data for field CONTENT (as per file_api.php:

..
case DISK:
file_ensure_valid_upload_path( $t_file_path );

            if ( !file_exists( $t_disk_file_name ) ) {
                if ( FTP == $t_method ) {
                    $conn_id = file_ftp_connect();
                    file_ftp_put ( $conn_id, $t_disk_file_name, $p_tmp_file );
                    file_ftp_disconnect ( $conn_id );
                }

                if ( !move_uploaded_file( $p_tmp_file, $t_disk_file_name ) ) {
                    trigger_error( FILE_MOVE_FAILED, ERROR );
                }
                chmod( $t_disk_file_name, 0400 );

                $c_content = '';
            } else {
                trigger_error( ERROR_FILE_DUPLICATE, ERROR );
            }
            break;

..

Solved for now by removing not null constraint on content field in the DB

TagsNo tags attached.

Relationships

related to 0010488 closeddregad Inserting strings > 4000 Bytes not working -> direct file upload and email 

Activities

ViperNet

ViperNet

2009-08-08 09:14

reporter   ~0022703

in the INSERT sql command replace the 'content' field's value (the apostrophes) with 'empty_blob()'

refer to issue 0010488