craftcms / webhooks

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

500 error when trying to create new entry with Webhooks 3.0.0 enabled #70

Closed chadclark closed 2 years ago

chadclark commented 2 years ago

Description

I recently updated a Craft v3.x site to v4.0.1. Everything updated without a hitch with the exception that I am now unable to add new entries to the one Entries channel of the site.

When I click the New Entry button, the page does not leave the Entries listing view. Opening up inspector, I see a 500 error for http://mysite.test/index.php?p=admin%2Factions%2Fentries%2Fcreate&v=1652231961856.

The preview shows more of the error:

error: "craft\\helpers\\Db::insert(): Argument #3 ($db) must be of type ?craft\\db\\Connection, bool given, called in /app/vendor/craftcms/webhooks/src/Plugin.php on line 335"
exception: "TypeError"
file: "/app/vendor/craftcms/cms/src/helpers/Db.php"
line: 933
trace: [{file: "/app/vendor/craftcms/webhooks/src/Plugin.php", line: 335, function: "insert",…},…]

When I disable Webhooks 3.0.0, I am once again able to publish (and edit existing) entries.

Additional info

angrybrad commented 2 years ago

Just released 3.0.1 with a fix for this. Thanks for reporting!