View Issue Details

IDProjectCategoryView StatusLast Update
0025002mantisbtcustom fieldspublic2019-01-02 17:25
Reporterrschmidt_333Assigned Toatrol 
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product Version2.17.1 
Target Version2.19.0Fixed in Version2.19.0 
Summary0025002: Error when updating content in a custom field of type "Text Area" ("Textbereich"): History cannot be stored
Description

While updating the text within a custom field of type "Text Area", we get the error Message:
"APPLICATION ERROR 0000401
Datenbankabfrage fehlgeschlagen. Die Reportmeldung lautet #1406: Data too long for column 'old_value' at row 1 für die Abfrage: INSERT INTO mantis_bug_history_table
( user_id, bug_id, date_modified, field_name, old_value, new_value, type )
VALUES
( ?, ?, ?, ?, ?, ?, ? )."
After that, the update in fact has been carried out, but it is not visible and traceable from the history.

Column 'old_value' in table mantis_bug_history_table is 'varchar 255', but should be 'longtext'? Same for column 'new_value'?

Steps To Reproduce

Write a long text (more then 255 characters) into a custom field of type Text Area. Store the entry. Then edit that entry, do some change to the text. Store that entry.

The error does not occure when using only short text.

TagsNo tags attached.

Relationships

related to 0024056 closedatrol Custom Fields of type "Textarea" cannot contain more than 255 chars due to bug_history table 

Activities

atrol

atrol

2018-11-22 08:08

developer   ~0060994

This should be fixed since version 2.13.0 see 0024056.
Are you sure you are runnung 2.17.1?

atrol

atrol

2018-11-22 08:26

developer   ~0060995

Forget my previous note, I think I understand now what happened.

I was not able to reproduce because MySQL on my test system was running in some kind of auto truncate mode.

atrol

atrol

2018-11-22 16:40

developer   ~0060997

PR https://github.com/mantisbt/mantisbt/pull/1413

Related Changesets

MantisBT: master 4609e811

2018-11-22 16:16:56

atrol

Details Diff
Truncate values before writing to database history table

TEXTAREA custom fields can contain more than 255 characters.
Changing such fields fails, as the old value can't be stored
in history table.

This change fixes the issue by truncating the string.

Fixes 0025002
Affected Issues
0025002
mod - core/history_api.php Diff File

Issue History

Date Modified Username Field Change
2018-11-22 05:59 rschmidt_333 New Issue
2018-11-22 08:08 atrol Status new => feedback
2018-11-22 08:08 atrol Note Added: 0060994
2018-11-22 08:23 atrol Assigned To => atrol
2018-11-22 08:23 atrol Status feedback => assigned
2018-11-22 08:26 atrol Note Added: 0060995
2018-11-22 16:39 atrol Target Version => 2.19.0
2018-11-22 16:40 atrol Note Added: 0060997
2018-11-22 18:44 dregad Relationship added related to 0024056
2018-11-29 04:40 atrol Changeset attached => MantisBT master 4609e811
2018-11-29 04:40 atrol Status assigned => resolved
2018-11-29 04:40 atrol Resolution open => fixed
2018-11-29 04:40 atrol Fixed in Version => 2.19.0
2019-01-02 17:25 vboctor Status resolved => closed