View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0008834 | mantisbt | public | 2008-01-30 10:23 | 2012-11-01 07:45 | |
Reporter | striker69 | Assigned To | dregad | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | closed | Resolution | no change required | ||
Product Version | 1.1.1 | ||||
Summary | 0008834: Database query failed. Error received from database was #1406: Data too long for column 'body' | ||||
Description | Seems that the email feature has changed in version 1.1.* from version 1.0.8. The emails are now inserted into the DB and then read back to be processed. When inserting the data in the DB, we get the error in the Summary. This happens on cases with lots of notes. I have looked at the DB (MySQL 5.0.27) and the datatype of column 'mantis_email_table.body' is LONGTEXT. Any hint on how to fix this? | ||||
Tags | email, utf8 | ||||
The problem is that there are some non-english characters in the notes and that the 'body' column was in latin1. I changed it to utf8 and everything works now. |
|
Hello, striker69 |
|
OK, the problem actually in number of bytes left in Summary field of related issues during email building. |
|
OK, some workaround found (may be need more work). function utf8_substr($str,$from,$len){ utf8 substrwww.yeap.lvreturn preg_replace('#^(?:[\x00-\x7F]|[\xC0-\xFF][\x80-\xBF]+){0,'.$from.'}'. and change a line in function relationship_get_details: $t_relationship_info_text .= utf8_substr( $t_bug->summary, 0, $t_summary_wrap_at - 3 ) . '...'; That works for me. |
|
We have exactly the same problem. |
|
We had another issue: |
|
Unfortunately, I do not know, I'm not specialist in PHP. Try to do that, if you know how, and write here the solution, if you find. |
|
Some news on this point? Today we found another char not working: Alt+0133 |
|
Could you please have a look at the \core\email_queue_api.php? I found the position BEFORE the failing INSERT INTO-Statement: If the field $c_metadata contains some "strange" characters like the mentioned above or like this: … (only 1 char, not 3 points!!) then we get a "Application error 0000401" and "#1406: Data too long for column 'body'". How can we CLEAN this field before saving it to the DB? |
|
I have the similar problem from time to time since we have upgraded from 1.0.6 to 1.1.2. There are a lot of APPLICATION WARNING 300 and then APPLICATION ERROR 401: Database query failed. Error received from database was #1406: Data too long for column 'body' at row 1... Request is INSERT INTO mantis_email_table(... Sometimes it happens when I close an issue with assigning the version number in which it was resolved, and in this case the version change does not go to the database indeed, so I need to check it and do it again. It will be great, if possible, to have some feedback from Mantis team about this issue to be sure that the future 1.2... stable release will be free of this problem. |
|
Observed error message when attempting to change status on an issue: APPLICATION ERROR 0000401 This is with Mantis: This database was originally at version 1.1.2a03 -> 1.2.0a03 -> 1.2.0rc2 |
|
The problem appears to be that the database has mantis_email_table.body as TEXT when the code is assuming type LONGTEXT. I noticed that the schema upgrade logic does not appear to upgrade the body column. Some of issues have long notes.... It seems that an appropriately fashioned xlter command could resolve this issue. Could someone on the development team comment on this issue? |
|
I changed the body character type from latin 1 to utf8 just in case that is the problem. Some notes get pasted from other tools.... |
|
I can confirm that this error is closely related to email feature. When I turn off emailing, no such error happens. |
|
We are resolving this issue as "no change required", because it was reported against an old version of MantisBT which is no longer supported. We recommend that you upgrade to the latest stable version [1]; if after doing so the problem still exists, do not hesitate to reopen the issue. [1] https://sourceforge.net/projects/mantisbt/files/mantis-stable/ |
|
Wow, what kind of a solution! Waiting more then 4 years (since the first entry for this bug) and then "resolve" this issue because of "an old version which is no longer supported"? Never seen before - but to be honest: I'm lucky. I've found another ticketing solution 3 years ago. |
|
This issue is not reproducible in the current version of Mantis, hence my closure of the bug report and recommendation to upgrade. I'm glad to hear you are happily using another software. That said, please go back to where you came from, and don't bother posting such useless and non-constructive comments here again. |
|