0

I migrated from Request Tracker 3.8 to 4.2 with existing db and now I can't create new tickets that contain umlauts and that sort of characters in subject:

Couldn't create a ticket: Internal Error: Couldn't execute the query 'INSERT INTO Tickets (Resolved, Created, Status, LastUpdatedBy, Subject, Type, InitialPriority, FinalPriority, SLA, Starts, Queue, Due, Creator, Started, Priority, LastUpdated) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'Incorrect string value: '\xE4\xE4' for column 'Subject' at row 1

The db already holds special characters and when I check character name set then everything seems to be as it should be(?):

mysql> SELECT character_set_name FROM information_schema.`COLUMNS`  WHERE 
table_schema = "rt4"   AND table_name = "Tickets"   AND column_name = 
"Subject";                                                      
+-------------->------+
| character_set_name |
+--------------------+
| utf8               |
+--------------------+
1 row in set (0.00 sec)

So, what exactly is it that RT4 is trying to insert into db?

2 Answers2

0

Apparently, the bytes that were put into the 5th ? were encoded in latin1, yet you said they were utf8. Since E4E4 is not a valid utf8 encoding for anything, the error happened.

See "Best practice" in Trouble with utf8 characters; what I see is not what I stored I can't tell from the limited information how many of the steps were not followed.

Community
  • 1
  • 1
Rick James
  • 135,179
  • 13
  • 127
  • 222
0

For upgrades from older RT and older MySQL, there are some extra steps to handle changes in the way the database handles encodings. These steps are detailed in this upgrading document. If you can redo your upgrade with these steps, it may resolve your issue.

Jim Brandt
  • 611
  • 5
  • 4
  • Actually the same problem appears with clean install. The table Tickets is in utf8 and when I try to create new ticket in RT4 UI with subject 'ääää' then [critical]: Couldn't create a ticket: Sisemine viga: Couldn't execute the query 'INSERT INTO Tickets (SLA, LastUpdated, Status, Queue, LastUpdatedBy, Starts, Subject, Type, Started, Priority, Creator, Due, Resolved, Created) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'Incorrect string value: '\xE4\xE4\xE4\xE4' for column 'Subject' at row 1 (/opt/rt4/sbin/../lib/RT/Ticket.pm:421) – Mart Seedre May 04 '17 at 14:19
  • This could be due to incompatible changes in recent versions of DBD::mysql. You could try installing an earlier version, like [4.041](https://metacpan.org/pod/release/MICHIELB/DBD-mysql-4.041/lib/DBD/mysql.pm). – Jim Brandt May 07 '17 at 15:44