deck icon indicating copy to clipboard operation
deck copied to clipboard

Error when using smiley 😈 in card title

Open rubo77 opened this issue 5 years ago • 6 comments
trafficstars

How to use GitHub

  • Please use the 👍 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Client details:

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]
  • Device: [e.g. iPhone6, desktop]
Server details

Operating system: Linux

Web server: apache2

Database: myriadb

PHP version: 7.4

Nextcloud version: 19.0.3

Where did you install Nextcloud from: docker

When I enter a new deck entry with the content "smiley test 😈" I get this error:

 Could not create card: An exception occurred while executing 'INSERT INTO `oc_deck_cards`(`title`,`stack_id`,`type`,`order`,`owner`,`description`,`created_at`,`last_modified`) VALUES(?,?,?,?,?,?,?,?)' with params ["smiley test \ud83d\ude08", 1, "plain", 999, "ruben", "", 1600067164, 1600067164]: SQLSTATE[22007]: Invalid datetime format: 1366 Incorrect string value: '\xF0\x9F\x98\x88' for column `nextcloud`.`oc_deck_cards`.`title` at row 1

It works on my other instance, where I have updated the mariadb to support 4-Byte characters.

But this error should better be catched and give a hint to the non-4-byte support. Also it would be helpful, if the smyley would automatically be converted to ascii, before raising such a database error.

rubo77 avatar Sep 14 '20 07:09 rubo77

Which version of deck are you using?

juliusknorr avatar Sep 14 '20 07:09 juliusknorr

The latest stable. I always update all apps as soon as NC announces updates

rubo77 avatar Sep 15 '20 19:09 rubo77

Ah, indeed our checks for mb4 support only are placed for the description not the card title.

juliusknorr avatar Sep 15 '20 19:09 juliusknorr

I wonder, why the error message also said "invalid date format" ?

rubo77 avatar Sep 15 '20 22:09 rubo77

No idea that also seems odd to me, since there is actually no datetime column involved.

juliusknorr avatar Sep 16 '20 05:09 juliusknorr

https://github.com/nextcloud/deck/blob/688649f5a8a1b11af9c7bb5f653e30aadbac423c/lib/Db/CardMapper.php#L65-L78

joshtrichards avatar Apr 30 '25 15:04 joshtrichards