craftcms / webhooks

Plugin for integrating Craft with Zapier and IFTTT.
https://plugins.craftcms.com/webhooks
MIT License
84 stars 12 forks source link

3.2 Beta Fires Sooooo Many saveEntry Events #13

Closed theskyfloor closed 5 years ago

theskyfloor commented 5 years ago

Will there be some way to limit this behavior when it comes to the Webhooks plug-in. Maybe a new event... or perhaps you really do need to revisit conditionals in the settings of the plug-in. I am testing and it fired 13 Webhooks in 90 seconds - so I am assuming each auto save is sending a separate hook. Thanks!

If this is better off in Craft repo let me know.

Screen Shot 2019-06-07 at 11 17 05 AM
minyan-gu commented 5 years ago

I have the same issue here, majority events are generated by the autosave feature introduced in 3.2.

They have recently disabled the auto-creation of draft in Craft CMS when editing an Entry. However, when you create a new Entry, it auto creates a draft, and hence the auto-saving is still enabled. I'm not sure how they decide the saving-points, but it feels like they are firing multiple events per saving-point when you hit the Save button.

I think the solution is either to raise a FR ticket inside Craft CMS to let end user to disable the autosaving feature completely, or raise a FR ticket here to enhance the webhook so it can filter out the event based on object status, e.g. isDraft, isRevision etc..

Created FR here: #14

brandonkelly commented 5 years ago

We just released Webhooks 2.1.0 with a new Event Filters feature, which lets you prevent the webhook from executing in certain conditions:

Event Filters

This will drastically reduce the number of webhooks that get sent.