2

Just received this deprecated warning in the dashboard. However the file it refers to does not contain the deprecated code. Any ideas? I can locate the deprecated function in several core files though. I have the latest upgrade so not sure why it is returning this error? Anyone come across this as well?

Calling getChildren() to fetch an element’s target relations has been deprecated.

Full stack Trace:

29 Deprecation error: Calling getChildren() to fetch an element’s target relations has been deprecated. Use the relatedTo param instead. Called from /serverpath/craft/app/models/BaseElementModel.php (545)

28 Craft\UserModel::getChildren() 27 call_user_func_array(array(Craft\UserModel, "getChildren"), array()) Called from /serverpath/craft/app/vendor/twig/twig/lib/Twig/Template.php (478)

26 __TwigTemplate_c931853f702811dd00a8d276cbef73ef24b391da71bd1ae0c434f5db4f701484::getAttribute(Craft\UserModel, "getChildren", array(), "method") Called from /serverpath/craft/app/etc/templating/BaseTemplate.php (41)

25 Template: user/profile (13) Called from /serverpath/craft/storage/runtime/compiled_templates/c9/31/853f702811dd00a8d276cbef73ef24b391da71bd1ae0c434f5db4f701484.php (43)

24 __TwigTemplate_c931853f702811dd00a8d276cbef73ef24b391da71bd1ae0c434f5db4f701484::block_main(array("craft" => Craft\CraftVariable, "blx" => Craft\CraftVariable, "now" => Craft\DateTime, "loginUrl" => "http://domainname/login"), array("extraHead" => array(__TwigTemplate_9b802816e813e2db8b5808c859ea97942fccd5b7f9bec86451c103eb6b2e5f27, "block_extraHead"), "main" => array(__TwigTemplate_c931853f702811dd00a8d276cbef73ef24b391da71bd1ae0c434f5db4f701484, "block_main"))) Called from /serverpath/craft/app/vendor/twig/twig/lib/Twig/Template.php (144)

23 Template: user/_layout (101)
Called from /serverpath/craft/storage/runtime/compiled_templates/9b/80/2816e813e2db8b5808c859ea97942fccd5b7f9bec86451c103eb6b2e5f27.php (227)

22 __TwigTemplate_9b802816e813e2db8b5808c859ea97942fccd5b7f9bec86451c103eb6b2e5f27::doDisplay(array("craft" => Craft\CraftVariable, "blx" => Craft\CraftVariable, "now" => Craft\DateTime, "loginUrl" => "http://domainname/login"), array("extraHead" => array(__TwigTemplate_9b802816e813e2db8b5808c859ea97942fccd5b7f9bec86451c103eb6b2e5f27, "block_extraHead"), "main" => array(__TwigTemplate_c931853f702811dd00a8d276cbef73ef24b391da71bd1ae0c434f5db4f701484, "block_main"))) Called from /serverpath/craft/app/vendor/twig/twig/lib/Twig/Template.php (279)

21 __TwigTemplate_9b802816e813e2db8b5808c859ea97942fccd5b7f9bec86451c103eb6b2e5f27::displayWithErrorHandling(array("craft" => Craft\CraftVariable, "blx" => Craft\CraftVariable, "now" => Craft\DateTime, "loginUrl" => "http://domainname/login"), array("extraHead" => array(__TwigTemplate_9b802816e813e2db8b5808c859ea97942fccd5b7f9bec86451c103eb6b2e5f27, "block_extraHead"), "main" => array(__TwigTemplate_c931853f702811dd00a8d276cbef73ef24b391da71bd1ae0c434f5db4f701484, "block_main"))) Called from /serverpath/craft/app/vendor/twig/twig/lib/Twig/Template.php (253)

20 Template: user/_layout (1)
Called from /serverpath/craft/storage/runtime/compiled_templates/c9/31/853f702811dd00a8d276cbef73ef24b391da71bd1ae0c434f5db4f701484.php (31)

19 __TwigTemplate_c931853f702811dd00a8d276cbef73ef24b391da71bd1ae0c434f5db4f701484::doDisplay(array("craft" => Craft\CraftVariable, "blx" => Craft\CraftVariable, "now" => Craft\DateTime, "loginUrl" => "http://domainname/login"), array("main" => array(__TwigTemplate_c931853f702811dd00a8d276cbef73ef24b391da71bd1ae0c434f5db4f701484, "block_main"))) Called from /serverpath/craft/app/vendor/twig/twig/lib/Twig/Template.php (279)

18 __TwigTemplate_c931853f702811dd00a8d276cbef73ef24b391da71bd1ae0c434f5db4f701484::displayWithErrorHandling(array("craft" => Craft\CraftVariable, "blx" => Craft\CraftVariable, "now" => Craft\DateTime, "loginUrl" => "http://domainname/login"), array("main" => array(__TwigTemplate_c931853f702811dd00a8d276cbef73ef24b391da71bd1ae0c434f5db4f701484, "block_main"))) Called from /serverpath/craft/app/vendor/twig/twig/lib/Twig/Template.php (253)

17 __TwigTemplate_c931853f702811dd00a8d276cbef73ef24b391da71bd1ae0c434f5db4f701484::display(array()) Called from /serverpath/craft/app/vendor/twig/twig/lib/Twig/Template.php (264)

16 __TwigTemplate_c931853f702811dd00a8d276cbef73ef24b391da71bd1ae0c434f5db4f701484::render(array()) Called from /serverpath/craft/app/vendor/twig/twig/lib/Twig/Environment.php (292)

15 Twig_Environment::render("user/profile", array()) Called from /serverpath/craft/app/services/TemplatesService.php (220)

14 Craft\TemplatesService::render("user/profile", array()) Called from /serverpath/craft/app/controllers/BaseController.php (74)

13 Craft\TemplatesController::renderTemplate("user/profile", array()) Called from /serverpath/craft/app/controllers/TemplatesController.php (55)

12 Craft\TemplatesController::actionRender("user/profile", array())

11 ReflectionMethod::invokeArgs(Craft\TemplatesController, array("user/profile", array())) Called from /serverpath/craft/app/framework/web/actions/CAction.php (108)

10 CInlineAction::runWithParamsInternal(Craft\TemplatesController, ReflectionMethod, array("p" => "user/profile", "variables" => array(), "template" => "user/profile")) Called from /serverpath/craft/app/framework/web/actions/CInlineAction.php (47)

9 CInlineAction::runWithParams(array("p" => "user/profile", "variables" => array(), "template" => "user/profile")) Called from /serverpath/craft/app/framework/web/CController.php (308)

8 Craft\TemplatesController::runAction(CInlineAction) Called from /serverpath/craft/app/framework/web/CController.php (286)

7 Craft\TemplatesController::runActionWithFilters(CInlineAction, array()) Called from /serverpath/craft/app/framework/web/CController.php (265)

6 Craft\TemplatesController::run("render") Called from /serverpath/craft/app/framework/web/CWebApplication.php (282)

5 Craft\WebApp::runController("templates/render") Called from /serverpath/craft/app/framework/web/CWebApplication.php (141)

4 Craft\WebApp::processRequest() Called from /serverpath/craft/app/etc/web/WebApp.php (266)

3 Craft\WebApp::processRequest() Called from /serverpath/craft/app/framework/base/CApplication.php (180)

2 Craft\WebApp::run() Called from /serverpath/craft/app/index.php (62)

1 require_once("/serverpath/craft/app/index.php") Called from /serverpath/public/index.php (19)

  • 1
    Hi @Lettie, can you please paste in the entire warning message? – Mats Mikkel Rummelhoff Apr 29 '15 at 17:42
  • Try 1) emptying your /craft/storage folder, and/or 2) re-download Craft and replace the /app folder with a fresh copy – Mats Mikkel Rummelhoff Apr 30 '15 at 12:03
1

It's hard to tell without seeing the actual error message and stack trace, but there is a button next to the deprecation message that you can click that will show the full stack trace to see where the message originated from.

Most like it's coming from a template, but you can update your original message with the stack trace so we can be sure.

| improve this answer | |

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.