SQL Error when response body contains unsupported characters
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 84
- Forks
- 12
- PR merge metrics
- No merged PRs in 30d
Description
Description
We are getting errors when the webhook fires and receives a response body containing emojis, specifically :
[273218] Sending webhook “ISR cache bust Entries” (attempt: 2, pid: 249507) - Error (time: 3.632s): SQLSTATE[HY000]: General error: 1366 Incorrect string value: '\xF0\x9F\x93\x8D O...' for column 'responseBody' at row 1
Steps to reproduce
- create webhook that requests a page with emojis in the body
- trigger webhook
Additional info
- Craft version: 4.5.11.1
- PHP version: 8.2.1
- Database driver & version: MySQL 5.7.42
- Plugins & versions: Webhooks 3.0.5
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
No source files or tests are named. Start by locating where webhook response bodies are persisted and inspect how the responseBody column handles emoji characters under MySQL 5.7. Reproduce the webhook with an emoji-containing response, then verify the response is stored without the SQL error and add a regression test if the project has coverage for this path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- mysql, php
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100