deck
deck copied to clipboard
Error when using smiley 😈 in card title
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:
- Go to '...'
- Click on '....'
- Scroll down to '....'
- 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.
Which version of deck are you using?
The latest stable. I always update all apps as soon as NC announces updates
Ah, indeed our checks for mb4 support only are placed for the description not the card title.
I wonder, why the error message also said "invalid date format" ?
No idea that also seems odd to me, since there is actually no datetime column involved.
https://github.com/nextcloud/deck/blob/688649f5a8a1b11af9c7bb5f653e30aadbac423c/lib/Db/CardMapper.php#L65-L78