View Issue Details

IDProjectCategoryView StatusLast Update
0024650mantisbtcustom fieldspublic2018-08-17 17:45
Reporterconstrictor14 Assigned Toatrol  
Status closedResolutionno change required 
Product Version2.16.0 
Target VersionFixed in Version 
Summary0024650: When custom Textarea value over 255 chars (multiline) attempts to save history similar behavior as 0024056 observed

So it looked like it was not counting the newlines as part of the total number of characters during the truncation process and that afterwards it was attempting to save a 258 character value back to the 255 limit field and blowing up.

This led to an odd state where the update was successful, but creating the history was not, and when the user went Back they were confronted with a message indicating that the issue had been updated by another user (although really it was them). Reloading the issue showed the update to be successful.

As a workaround, I decreased the value of DB_FIELD_SIZE_HISTORY_VALUE to 210 to provide some headroom. Seemed to resolve the issue for us for now, though there's an upper limit on number of lines supported (255-210 = 45) if what I thought was wrong was in fact an issue.

Stripping out all the special characters from the history entries is probably what I'd recommend before doing the substring on it.

Additional Information

Mantis 2.16.0
Windows Server 2012 Standard x64
IIS 8.0.9200
PHP 7.2.7
MySQL 5.7.22

TagsNo tags attached.




2018-08-03 11:51


Error Saving History.jpg (27,676 bytes)
Error Saving History.jpg (27,676 bytes)


2018-08-03 13:54

developer   ~0060355

I was not able to reproduce on my test systems, but I don't have exactly the same environment.

Maybe this is caused by a PHP bug in the version you use, e.g.
Could you please try if upgrading PHP to 7.2.8 fixes the issue?



2018-08-05 15:32

reporter   ~0060357

I'll give that a try. Thanks for the research! I'll report back early this week.



2018-08-06 09:03

reporter   ~0060362

Seems to have done the job. Resolved from my end.



2018-08-06 09:07

developer   ~0060363

Thanks for the feedback.

Issue History

Date Modified Username Field Change
2018-08-03 11:51 constrictor14 New Issue
2018-08-03 11:51 constrictor14 File Added: Error Saving History.jpg
2018-08-03 13:54 atrol Status new => feedback
2018-08-03 13:54 atrol Note Added: 0060355
2018-08-05 15:32 constrictor14 Note Added: 0060357
2018-08-05 15:32 constrictor14 Status feedback => new
2018-08-05 15:45 atrol Status new => feedback
2018-08-06 09:03 constrictor14 Note Added: 0060362
2018-08-06 09:03 constrictor14 Status feedback => new
2018-08-06 09:07 dregad Assigned To => atrol
2018-08-06 09:07 dregad Status new => resolved
2018-08-06 09:07 dregad Resolution open => no change required
2018-08-06 09:07 dregad Note Added: 0060363
2018-08-17 17:45 atrol Status resolved => closed