kanboard-plugin-wiki icon indicating copy to clipboard operation
kanboard-plugin-wiki copied to clipboard

SQL Error: SQLSTATE[HY000]

Open carlosnewmusic opened this issue 3 years ago • 7 comments

This issue is:

  • [x] Bug report
  • [ ] Feature request
  • [ ] Improvement

Actual behaviour

Internal Error: SQL Error: SQLSTATE[HY000]: General error: 1366 Incorrect string value: '\xF0\x9F\x98\x84\x0D\x0A...' for column 'content' at row 1

Expected behaviour

that it is stored correctly

Steps to reproduce

edit wiki and save

Screenshots

Logs

Configuration

  • Kanboard version:1.2.21
  • Database type and version:mysql 5.6.47
  • PHP version:8.1.2
  • OS: Win
  • Browser: Firefox
  • Application settings Language: Es

carlosnewmusic avatar Feb 10 '22 10:02 carlosnewmusic

@carlosnewmusic what version of the plugin are you using? likely this is a file encoding issue. I've encoded it to utf8. if you have special characters sometimes the table in mysql has to be updated to support them.

function version_7(PDO $pdo){ $pdo->exec("ALTER TABLE wikipage CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin;"); $pdo->exec("ALTER TABLE wikipage_editions CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin;"); }

lastlink avatar Nov 11 '22 23:11 lastlink

ALTER TABLE wikipage CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin;

no such table exists in the database :(

carlosnewmusic avatar Nov 12 '22 14:11 carlosnewmusic

what version of the plugin are you using? also the wikipage table must exist for the plugin to even work.

lastlink avatar Nov 12 '22 14:11 lastlink

I might recommend reinstalling the extension, dropping any wiki tables and looking for the migrations table to remove entries

lastlink avatar Nov 12 '22 14:11 lastlink

what version of the plugin are you using? also the wikipage table must exist for the plugin to even work.

0.3.0 at the time, I have now updated it; Can't the content of the old tables be migrated to the new tables?

carlosnewmusic avatar Nov 13 '22 22:11 carlosnewmusic

I might recommend reaching out for technical help on https://kanboard.discourse.group/c/plugins/8. I don't have enough info on your setup to help you. It's probably some kind of foreign language special character encoding.

lastlink avatar Nov 13 '22 23:11 lastlink

looks like solution to update the character set yet again to support emojis. https://kanboard.discourse.group/t/wiki-plugin-error-message-when-save-page-with-emojis/2357/6 I might push this out next month unless someone else gets a pr in. I'd have to test it in several databases to verify.

lastlink avatar Nov 19 '22 04:11 lastlink