View Issue Details

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

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.
Attached Files
Error Saving History.jpg (27,676 bytes)   
Error Saving History.jpg (27,676 bytes)   

Activities

atrol

atrol

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. https://bugs.php.net/bug.php?id=76532
Could you please try if upgrading PHP to 7.2.8 fixes the issue?

constrictor14

constrictor14

2018-08-05 15:32

reporter   ~0060357

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

constrictor14

constrictor14

2018-08-06 09:03

reporter   ~0060362

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

dregad

dregad

2018-08-06 09:07

developer   ~0060363

Thanks for the feedback.