View Issue Details

IDProjectCategoryView StatusLast Update
0017443mantisbtdb mssqlpublic2014-07-10 03:40
Reporterkarlito Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status acknowledgedResolutionopen 
Product Version1.2.17 
Summary0017443: proj_doc_update.php: Unhandled error if description longer than 250 characters
Description

proj_doc_update.php: Unhandled error if description longer than 250 characters because there is no limit to text entered in textarea.
Probably should change data type from varchar(250) to text.

Steps To Reproduce

Open existing project document or create new one (proj_doc_edit_page.php), specify description longer than 250 characters.

TagsNo tags attached.

Activities

dregad

dregad

2014-06-12 10:16

developer   ~0040796

Not sure what you mean by 'unhandled error' - just tried this both in 1.2.x master, and the text just gets silently truncated to 250 chars but I'm not getting any error at all.

In any case, even though you're probably right that the field's size should be increased, as the project documentation feature is deprecated, we will not change the schema to accommodate for bigger text.

Adding a maxlength attribute to the textarea may be an option, but that's new to HTML5 and not supported in every browser.

atrol

atrol

2014-06-12 11:42

developer   ~0040798

maxlength should be no problem
http://www.w3schools.com/tags/att_input_maxlength.asp

We use it quite a lot in bug_report_page.php

dregad

dregad

2014-06-12 12:54

developer   ~0040799

@atrol - wrong maxlength... this is about textarea, not input

http://www.w3schools.com/tags/att_textarea_maxlength.asp

The maxlength attribute is new for the <textarea> tag in HTML5.

The maxlength attribute is supported in Internet Explorer 10+, Firefox, Opera 15+, Chrome, and Safari.
Note: The maxlength attribute of the <textarea> tag is not supported in Internet Explorer 9 and earlier versions, or in Opera 12 and earlier versions.

atrol

atrol

2014-06-12 16:50

developer   ~0040800

Thanks, got it.
I should read whole sentences instead of just a few words ;-)

karlito

karlito

2014-06-13 00:45

reporter   ~0040801

Last edited: 2014-06-13 00:46

Sorry, my bad, did not mention this is again on MSSQL.
I get error "APPLICATION ERROR # 401"
"Message: [Microsoft][SQL Server Native Client 11.0][SQL Server]String or binary data would be truncated.
SQLState: 01000
Error Code: 3621
Message: [Microsoft][SQL Server Native Client 11.0][SQL Server]The statement has been terminated.
par pieprasījumu: UPDATE mantis_project_file_table
SET title=?, description=?
WHERE id=?."

Error or no error, data should not be truncated.
Like in bug page description fields are saved as text.

grangeway

grangeway

2014-06-13 15:40

reporter   ~0040805

Hi Karlito,

Regarding MSSQL support, this is currently known to be broken in the current versions of Mantis. We are replacing the current database layer to fix support for non-mysql after the 1.3 release.

The following text is what i've been giving out to other users regarding this:

"
Hi Sketa,

From the error message you receive, it looks like you are using MSSQL - I personally run MSSQL with Mantis in production at work, and have been a developer on mantis for the last 10 years. It is a known issue that support for non-MySQL is problematic in the current release - we are planning to fix this properly by replacing the current database layer shortly after the 1.3 release ( I've been told previously by others in the team we can aim to do with within a month of the 1.3 release), so for now, you may be better off using MySQL or manually patching the issue.

I've been using the following text on the bug tracker for issues relating to other databases:

MantisBT currently supports Mysql and has support for other database engines.

The support for other databases is known to be problematic.

Having implemented the current database layer into Mantis 10 years ago, I'm currently working on replacing the current layer.

If you are interested in using Mantis with non-mysql databases - for example, Oracle, PGSQL or MSSQL, and would be willing to help out testing the new database layer, please drop me an email at paul@mantisforge.org

In the meantime, I'd advise running Mantis with Mysql Only to avoid issues.

Thanks
Paul"