Error when using smiley 😈 in card title
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.4k
- Forks
- 354
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 43
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce card creation with the title "smiley test 😈" on the reported MariaDB setup, then trace the card-creation path that writes the title to oc_deck_cards. Check how the 4-byte character failure is surfaced; done means the unsupported-character case has a clear, intentional user-facing outcome and the reproduction no longer produces an unhelpful database error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- mariadb
- Domain
- backend, database
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100