MineWeb / MineWebCMS

🚀 A French Minecraft CMS since 2015 (used by +1k websites)
https://mineweb.org
GNU General Public License v3.0
92 stars 41 forks source link

[BUG] Cyrillic in news/pages #193

Open Nostrum opened 4 years ago

Nostrum commented 4 years ago

When I try to create an article or page with Cyrillic characters in title I get an error and the article is not created. Logs is down here

2020-01-23 15:24:20 Error: [PDOException] SQLSTATE[22007]: Invalid datetime format: 1366 Incorrect string value: '\xD0\xA2\xD0\xB5\xD1\x81...' for columndb.news.title` at row 1 Request URL: /admin/news/add_ajax Stack Trace:

0 /home/l/linux/localhost/public_html/lib/Cake/Model/Datasource/DboSource.php(458): PDOStatement->execute(Array)

1 /home/l/linux/localhost/public_html/lib/Cake/Model/Datasource/DboSource.php(424): DboSource->_execute('INSERT INTO `s1...', Array)

2 /home/l/linux/localhost/public_html/lib/Cake/Model/Datasource/DboSource.php(1012): DboSource->execute('INSERT INTO `s1...')

3 /home/l/linux/localhost/public_html/lib/Cake/Model/Model.php(1851): DboSource->create(Object(News), Array, Array)

4 /home/l/linux/localhost/public_html/app/Controller/NewsController.php(264): Model->save()

5 [internal function]: NewsController->admin_add_ajax()

6 /home/l/linux/localhost/public_html/lib/Cake/Controller/Controller.php(491): ReflectionMethod->invokeArgs(Object(NewsController), Array)

7 /home/l/linux/localhost/public_html/lib/Cake/Routing/Dispatcher.php(191): Controller->invokeAction(Object(CakeRequest))

8 /home/l/linux/localhost/public_html/lib/Cake/Routing/Dispatcher.php(165): Dispatcher->_invoke(Object(NewsController), Object(CakeRequest))

9 /home/l/linux/localhost/public_html/app/webroot/index.php(114): Dispatcher->dispatch(Object(CakeRequest), Object(CakeResponse))

10 {main}

`

Nostrum commented 4 years ago

Same thing i got in comments to news