2

Message:

The defineComponents event on CraftVariable has been deprecated. Use the init event to register custom components instead.

Origin:

/vendor/craftcms/cms/src/web/twig/Extension.php:1026

Here is the full stack trace:

24  Deprecation error: The `defineComponents` event on CraftVariable has been deprecated. Use the `init` event to register custom components instead. 
Called from /var/www/vhosts/FWS/rcsmillwork.com/vendor/craftcms/cms/src/web/twig/variables/CraftVariable.php:139
23  craft\web\twig\variables\CraftVariable::__construct() 
Called from /var/www/vhosts/FWS/rcsmillwork.com/vendor/craftcms/cms/src/web/twig/Extension.php:1026
22  craft\web\twig\Extension::getGlobals() 
Called from /var/www/vhosts/FWS/rcsmillwork.com/vendor/twig/twig/src/ExtensionSet.php:329
21  Twig\ExtensionSet::getGlobals() 
Called from /var/www/vhosts/FWS/rcsmillwork.com/vendor/twig/twig/src/Environment.php:928
20  craft\web\twig\Environment::getGlobals() 
Called from /var/www/vhosts/FWS/rcsmillwork.com/vendor/twig/twig/src/Environment.php:948
19  craft\web\twig\Environment::mergeGlobals(["entry" => craft\elements\Entry, "variables" => ["entry" => craft\elements\Entry]]) 
Called from /var/www/vhosts/FWS/rcsmillwork.com/vendor/twig/twig/src/Template.php:380
18  __TwigTemplate_4a991a21fa97a9b639ef307d122221fd678770f77eef09c6bb44c40995815346::display(["entry" => craft\elements\Entry, "variables" => ["entry" => craft\elements\Entry]], []) 
Called from /var/www/vhosts/FWS/rcsmillwork.com/vendor/craftcms/cms/src/web/twig/Template.php:34
17  __TwigTemplate_4a991a21fa97a9b639ef307d122221fd678770f77eef09c6bb44c40995815346::display(["entry" => craft\elements\Entry, "variables" => ["entry" => craft\elements\Entry]]) 
Called from /var/www/vhosts/FWS/rcsmillwork.com/vendor/twig/twig/src/Template.php:392
16  __TwigTemplate_4a991a21fa97a9b639ef307d122221fd678770f77eef09c6bb44c40995815346::render(["entry" => craft\elements\Entry, "variables" => ["entry" => craft\elements\Entry]], []) 
Called from /var/www/vhosts/FWS/rcsmillwork.com/vendor/twig/twig/src/TemplateWrapper.php:45
15  Twig\TemplateWrapper::render(["entry" => craft\elements\Entry, "variables" => ["entry" => craft\elements\Entry]]) 
Called from /var/www/vhosts/FWS/rcsmillwork.com/vendor/twig/twig/src/Environment.php:318
14  craft\web\twig\Environment::render("index", ["entry" => craft\elements\Entry, "variables" => ["entry" => craft\elements\Entry]]) 
Called from /var/www/vhosts/FWS/rcsmillwork.com/vendor/craftcms/cms/src/web/View.php:343
13  craft\web\View::renderTemplate("index", ["entry" => craft\elements\Entry, "variables" => ["entry" => craft\elements\Entry]]) 
Called from /var/www/vhosts/FWS/rcsmillwork.com/vendor/craftcms/cms/src/web/View.php:393
12  craft\web\View::renderPageTemplate("index", ["entry" => craft\elements\Entry, "variables" => ["entry" => craft\elements\Entry]]) 
Called from /var/www/vhosts/FWS/rcsmillwork.com/vendor/craftcms/cms/src/web/Controller.php:161
11  craft\controllers\TemplatesController::renderTemplate("index", ["entry" => craft\elements\Entry, "variables" => ["entry" => craft\elements\Entry]]) 
Called from /var/www/vhosts/FWS/rcsmillwork.com/vendor/craftcms/cms/src/controllers/TemplatesController.php:78
10  craft\controllers\TemplatesController::actionRender("index", ["entry" => craft\elements\Entry, "variables" => ["entry" => craft\elements\Entry]])
9   call_user_func_array([craft\controllers\TemplatesController, "actionRender"], ["index", ["entry" => craft\elements\Entry]]) 
Called from /var/www/vhosts/FWS/rcsmillwork.com/vendor/yiisoft/yii2/base/InlineAction.php:57
8   yii\base\InlineAction::runWithParams(["template" => "index", "variables" => ["entry" => craft\elements\Entry], "p" => "contact"]) 
Called from /var/www/vhosts/FWS/rcsmillwork.com/vendor/yiisoft/yii2/base/Controller.php:157
7   craft\controllers\TemplatesController::runAction("render", ["template" => "index", "variables" => ["entry" => craft\elements\Entry], "p" => "contact"]) 
Called from /var/www/vhosts/FWS/rcsmillwork.com/vendor/craftcms/cms/src/web/Controller.php:109
6   craft\controllers\TemplatesController::runAction("render", ["template" => "index", "variables" => ["entry" => craft\elements\Entry], "p" => "contact"]) 
Called from /var/www/vhosts/FWS/rcsmillwork.com/vendor/yiisoft/yii2/base/Module.php:528
5   craft\web\Application::runAction("templates/render", ["template" => "index", "variables" => ["entry" => craft\elements\Entry], "p" => "contact"]) 
Called from /var/www/vhosts/FWS/rcsmillwork.com/vendor/craftcms/cms/src/web/Application.php:297
4   craft\web\Application::runAction("templates/render", ["template" => "index", "variables" => ["entry" => craft\elements\Entry], "p" => "contact"]) 
Called from /var/www/vhosts/FWS/rcsmillwork.com/vendor/yiisoft/yii2/web/Application.php:103
3   craft\web\Application::handleRequest(craft\web\Request) 
Called from /var/www/vhosts/FWS/rcsmillwork.com/vendor/craftcms/cms/src/web/Application.php:286
2   craft\web\Application::handleRequest(craft\web\Request) 
Called from /var/www/vhosts/FWS/rcsmillwork.com/vendor/yiisoft/yii2/base/Application.php:386
1   craft\web\Application::run() 
Called from /var/www/vhosts/FWS/rcsmillwork.com/web/index.php:21```

2

This seems to be a known bug in 3.1.31 and it looks like a fix will be in the next release.

0

If you share the full stack trace leading up to that, we can probably see which plugin/module it's coming from.

Otherwise, it's just a deprecation warning and won't really mean anything until Craft 4 comes out.

  • Added the full stack trace in the original post – Garry Burch Jun 26 '19 at 23:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.