craftcms / webhooks

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

Error when enabling plugin in production server #36

Closed howells closed 3 years ago

howells commented 3 years ago

Description

When I install and enable the plugin on my development env all is fine, but when I then deploy the resultant project config file, I get the following error on my production environment:

web_php_error  2020-10-19T08:21:06Z 2020-10-19 09:21:06 [-][1][bc8f8be2d28b2567502cfae946bde0b1][error][yii\base\ErrorException:2] yii\base\ErrorException: get_class() expects parameter 1 to be object, null given in /srv/app/pca/htdocs/vendor/craftcms/webhooks/src/Plugin.php:141
web_php_error  2020-10-19T08:21:06Z #0 /srv/app/pca/htdocs/vendor/craftcms/cms/src/web/ErrorHandler.php(76): yii\base\ErrorHandler->handleError(2, 'get_class() exp...', '/srv/app/pca/ht...', 141)
web_php_error  2020-10-19T08:21:06Z #1 [internal function]: craft\web\ErrorHandler->handleError(2, 'get_class() exp...', '/srv/app/pca/ht...', 141, Array)
web_php_error  2020-10-19T08:21:06Z #2 /srv/app/pca/htdocs/vendor/craftcms/webhooks/src/Plugin.php(141): get_class(NULL)
web_php_error  2020-10-19T08:21:06Z #3 [internal function]: craft\webhooks\Plugin->craft\webhooks\{closure}(Object(craft\events\RegisterElementSourcesEvent))
web_php_error  2020-10-19T08:21:06Z #4 /srv/app/pca/htdocs/vendor/yiisoft/yii2/base/Event.php(312): call_user_func(Object(Closure), Object(craft\events\RegisterElementSourcesEvent))

What am I missing?

Steps to reproduce

  1. Install and enable plugin locally
  2. Deploy to production environment

Additional info