Content
Polish letters - Internal error: An error occurred on the page you were trying to access.
Hello,
I’ve problem with using OpenProject using polish letters. When I try to write anything with polish letters and save it, I’ve got error message:
Internal error
An error occurred on the page you were trying to access.
If you continue to experience problems please contact your OpenProject administrator for assistance.
If you are the OpenProject administrator, check your log files for details about the error.
———————————————————————
There is such information in production.log: W, [2017-07-24T16:04:35.066448 #27847] WARN -- : You are setting a key that conflicts with a built-in method OmniAuth::Strategy::Options#display defined in Kernel. This can cause unexpected behavior when accessing the key via as a property. You can still access the key via the #[] method. W, [2017-07-24T16:04:35.067659 #27847] WARN -- : You are setting a key that conflicts with a built-in method OmniAuth::Strategy::Options#display defined in Kernel. This can cause unexpected behavior when accessing the key via as a property. You can still access the key via the #[] method. F, [2017-07-24T16:04:35.110384 #27847] FATAL -- : F, [2017-07-24T16:04:35.110511 #27847] FATAL -- : ActiveRecord::StatementInvalid (Mysql2::Error: Incorrect string value: '\xC5\x9Blani...' for column 'name' at row 1: UPDATE `statuses` SET `name` = 'W trakcie określania' WHERE `statuses`.`id` = 2): F, [2017-07-24T16:04:35.110559 #27847] FATAL -- : F, [2017-07-24T16:04:35.110624 #27847] FATAL -- : app/controllers/statuses_controller.rb:69:in `update' app/middleware/reset_current_user.rb:47:in `call'
Can anybody tell me how can I fix it?
Regards
Marcin
Seems to be the same as
Thanks Jens!
That is! I’ve repair this error by converting database and each of tables from latin1_… to utf8.
1. Log into MySQL
mysql -u root - p
2. Make sure what is default character set of database
show create database openproject;
how to check the names of databeses:
show databases;
how to check (short) list of tables:
show tables from openproject;
3. Make sure what is char set of columns
show table status from openproject;
4. Change database char set to utf8
alter database openproject default character set utf8 collate utf8_unicode_ci;
5. Change each of tables charakter set to utf8
(I’ve made it not in the fastest, but easiest way by changing name of tables - I’ve used MS Excel to produce lines of instructions and later put them into console comand line)
alter table openproject.<name of table> convert to character set utf8 collate utf8_general_ci;
Final effect is that everything works! Despite this this bug needs to be solved in next version of OP.
Good luck!
Glad to hear that Marcin and thanks for detailing the solution so that other users can benefit from your findings.