プロジェクト

全般

プロフィール

Vote #81284

未完了

SQL Error with UTF8 character greater or equals

Admin Redmine さんが約2年前に追加. 約2年前に更新.

ステータス:
Reopend
優先度:
通常
担当者:
-
カテゴリ:
Wiki_1
対象バージョン:
-
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
1
version_id:
0
issue_org_id:
34810
author_id:
34607
assigned_to_id:
0
comments:
4
status_id:
8
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
160
ステータス-->[Reopend]

説明

I am currently getting a fatal error using this character (greater or equals) editing a wiki page

https://fr.wiktionary.org/wiki/%E2%89%A5

Error

app/models/wiki_page.rb:249:in `block in save_with_content'
app/models/wiki_page.rb:245:in `save_with_content'
app/controllers/wiki_controller.rb:180:in `update'
lib/redmine/sudo_mode.rb:65:in `sudo_mode'
Started PUT "/projects/site-web/wiki/Breakpoints" for 92.167.55.166 at 2021-02-26 17:46:08 +0000
Processing by WikiController#update as HTML
  Parameters: {"utf8"=>"<9C><93>", "authenticity_token"=>"XXX", "content"=>{"version"=>"1", "text"=>"h1. Breakpoints\r\n\r\nNous utilisons bootstrap 5 avec ses breakpoints officiels\r\n\r\nhttps://getbootstrap.com/docs/5.0/layout/breakpoints/\r\n\r\n|_.Breakpoint|_.Class infix|_.Dimensions|_.Appareil|\r\n|X-Small|None|<576px|Mobile|\r\n|Small|sm|<89>576px|Mobile|\r\n|Medium|md|<89>768px|Mobile|\r\n|Large|lg|<89>992px|Ordinateur|\r\n|Extra large|xl|<89>1200px|Ordinateur|\r\n|Extra extra large|xxl|<89>1400px|Ordinateur|\r\n", "comments"=>""}, "wiki_page"=>{"parent_id"=>"25"}, "commit"=>"Sauvegarder", "project_id"=>"site-web", "id"=>"Breakpoints"}
  Current user: Me (id=1)
Completed 500 Internal Server Error in 257ms (ActiveRecord: 249.6ms)

ActiveRecord::StatementInvalid (Mysql2::Error: Incorrect string value: '\xE2\x89\xA5576...' for column `redmine`.`wiki_contents`.`text` at row 1: INSERT INTO `wiki_contents` (`page_id`, `author_id`, `text`, `updated_on`, `version`) VALUES (27, 1, 'h1. Breakpoints\r\n\r\nNous utilisons bootstrap 5 avec ses breakpoints officiels\r\n\r\nhttps://getbootstrap.com/docs/5.0/layout/breakpoints/\r\n\r\n|_.Breakpoint|_.Class infix|_.Dimensions|_.Appareil|\r\n|X-Small|None|<576px|Mobile|\r\n|Small|sm|<89>576px|Mobile|\r\n|Medium|md|<89>768px|Mobile|\r\n|Large|lg|<89>992px|Ordinateur|\r\n|Extra large|xl|<89>1200px|Ordinateur|\r\n|Extra extra large|xxl|<89>1400px|Ordinateur|\r\n', '2021-02-26 17:46:08', 1)):

Here is my redmine's environment

Environment:
  Redmine version                4.1.1.stable
  Ruby version                   2.6.3-p62 (2019-04-16) [x86_64-linux]
  Rails version                  5.2.4.2
  Environment                    production
  Database adapter               Mysql2
  Mailer queue                   ActiveJob::QueueAdapters::AsyncAdapter
  Mailer delivery                smtp
SCM:
  Git                            2.25.1
  Filesystem                     
Redmine plugins:
  no plugin installed

journals

To make it work quickly, I just replaced the character by >=, this is not a problem for my usage.
--------------------------------------------------------------------------------
What kind of database encoding are you using?

You can use the following queries to retrieve this:

1. MySQL config:
<pre><code class="sql">
SHOW VARIABLES WHERE Variable_name LIKE 'character\_set\_%' OR Variable_name LIKE 'collation%';
</code></pre>

2. Redmine database:
<pre><code class="sql">
SELECT default_character_set_name FROM information_schema.SCHEMATA WHERE schema_name = "<redmine_database_name>";
</code></pre>
--------------------------------------------------------------------------------
Please reopen with the required information.
--------------------------------------------------------------------------------
Sorry, I missed the notification email.

<pre>
MariaDB [(none)]> SHOW VARIABLES WHERE Variable_name LIKE 'character\_set\_%' OR Variable_name LIKE 'collation%';
+--------------------------+--------------------+
| Variable_name | Value |
+--------------------------+--------------------+
| character_set_client | utf8mb4 |
| character_set_connection | utf8mb4 |
| character_set_database | utf8mb4 |
| character_set_filesystem | binary |
| character_set_results | utf8mb4 |
| character_set_server | utf8mb4 |
| character_set_system | utf8 |
| collation_connection | utf8mb4_general_ci |
| collation_database | utf8mb4_general_ci |
| collation_server | utf8mb4_general_ci |
+--------------------------+--------------------+
10 rows in set (0.128 sec)
</pre>

<pre>
MariaDB [(none)]> SELECT default_character_set_name FROM information_schema.SCHEMATA WHERE schema_name = "redmine";
+----------------------------+
| default_character_set_name |
+----------------------------+
| utf8mb4 |
+----------------------------+
1 row in set (0.000 sec)
</pre>
--------------------------------------------------------------------------------

Admin Redmine さんが約2年前に更新

  • カテゴリWiki_1 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0