Two Requests Sent for Each Event
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 84
- Forks
- 12
- PR merge metrics
- No merged PRs in 30d
Description
Description
I have a very basic GET webhook set up to run for Entry elements on the afterSave event. While testing, when I save an entry and then look at the Webhooks plugin Activity panel, there are two requests where I expect to be just one. Similarly my recipient app logs two incoming requests. Both have 200 response statuses so it wasn't a retry (and even if it was I don't think retries log as separate requests). This also happens with POST requests.
Steps to reproduce
- Create a new webhook
- Set the element to
craft\elements\Entry - Set the event to
afterSave - Leave the Event Filters at default
- Leave Debounce Key Format blank
- Set request type to GET and set the webhook URL
- Leave Custom Headers blank
- Open an existing entry and save
Additional info
- Craft version: 4.11.1
- PHP version: 8.1.29
- Database driver & version: MySQL 8.0.36
- Plugins & versions:
Amazon S3 2.2.1
Asset Rev 7.0.0
CKEditor 3.8.3
Element API 4.1.0
Super Table 3.0.14
Webhooks 3.1.0
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 the issue using a Craft Entry webhook configured for the afterSave event, then compare the Webhooks plugin Activity panel with the recipient application's logs. Test both GET and POST requests and confirm the fix results in exactly one request per entry save, without duplicate activity records.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100