0

I am taking over a Craft website for a client. It is currently working fine on the hosting environment.

I have pulled the website down locally from the hosting environment - the exact same files and database. It loads fine on the front end but when i try to login to the CMS I get the following error:

Unknown Property – yii\base\UnknownPropertyException

Setting unknown property: craft\models\Update::packageName

Current Stack Trace is

yii\base\UnknownPropertyException: Setting unknown property: craft\models\Update::packageName in C:\websites\sitename\craft\vendor\yiisoft\yii2\base\Component.php:209
Stack trace:
#0 C:\websites\sitename\craft\vendor\yiisoft\yii2\BaseYii.php(546): yii\base\Component->__set('packageName', 'craftcms/cms')
#1 C:\websites\sitename\craft\vendor\yiisoft\yii2\base\BaseObject.php(107): yii\BaseYii::configure(Object(craft\models\Update), Array)
#2 C:\websites\sitename\craft\vendor\craftcms\cms\src\models\Updates.php(46): yii\base\BaseObject->__construct(Array)
#3 C:\websites\sitename\craft\vendor\yiisoft\yii2\base\BaseObject.php(109): craft\models\Updates->init()
#4 C:\websites\sitename\craft\vendor\craftcms\cms\src\services\Updates.php(106): yii\base\BaseObject->__construct(Array)
#5 C:\websites\sitename\craft\vendor\craftcms\cms\src\services\Updates.php(77): craft\services\Updates->getUpdates()
#6 C:\websites\sitename\craft\vendor\craftcms\cms\src\utilities\Updates.php(54): craft\services\Updates->getTotalAvailableUpdates()
#7 C:\websites\sitename\craft\vendor\craftcms\cms\src\web\twig\variables\Cp.php(139): craft\utilities\Updates::badgeCount()
#8 C:\websites\sitename\craft\vendor\twig\twig\lib\Twig\Extension\Core.php(1619): craft\web\twig\variables\Cp->nav()
#9 C:\websites\sitename\craft\vendor\craftcms\cms\src\helpers\Template.php(73): twig_get_attribute(Object(craft\web\twig\Environment), Object(Twig_Source), Object(craft\web\twig\variables\Cp), 'nav', Array, 'method', false, false)
#10 C:\websites\sitename\craft\storage\runtime\compiled_templates\f1\f13f7c4e8944c04d846e31ed00e14a2608629f98720d53716d0af4c42c0406d5.php(194): craft\helpers\Template::attribute(Object(craft\web\twig\Environment), Object(Twig_Source), Object(craft\web\twig\variables\Cp), 'nav', Array, 'method')
#11 C:\websites\sitename\craft\vendor\twig\twig\lib\Twig\Template.php(189): __TwigTemplate_1c32b97c6410ddc5ca9b8ed7d632b5bccbdeb0d143fe0597ccd3c7f99a64b01d->block_body(Array, Array)
#12 C:\websites\sitename\craft\storage\runtime\compiled_templates\3c\3c75836f7fba009cc0921a3f7ba15118accf07b23220196c5f2089ccf35cd6d2.php(60): Twig_Template->displayBlock('body', Array, Array)
#13 C:\websites\sitename\craft\vendor\twig\twig\lib\Twig\Template.php(390): __TwigTemplate_718542758bc3fa1a8dece1e58e1d8b4f11f05f5a4656e1b152708d368c4b05c8->doDisplay(Array, Array)
#14 C:\websites\sitename\craft\vendor\craftcms\cms\src\web\twig\Template.php(49): Twig_Template->displayWithErrorHandling(Array, Array)
#15 C:\websites\sitename\craft\vendor\twig\twig\lib\Twig\Template.php(367): craft\web\twig\Template->displayWithErrorHandling(Array, Array)
#16 C:\websites\sitename\craft\vendor\craftcms\cms\src\web\twig\Template.php(31): Twig_Template->display(Array, Array)
#17 C:\websites\sitename\craft\storage\runtime\compiled_templates\a9\a92e015145d806a86731623fdb41794441f6ce354bf63ad55510fe6927ea8dba.php(40): craft\web\twig\Template->display(Array, Array)
#18 C:\websites\sitename\craft\vendor\twig\twig\lib\Twig\Template.php(390): __TwigTemplate_de404dcb5b6d933d901b54f0a85d2db6dc492673ab3c7c316d22689e124b1ce3->doDisplay(Array, Array)
#19 C:\websites\sitename\craft\vendor\craftcms\cms\src\web\twig\Template.php(49): Twig_Template->displayWithErrorHandling(Array, Array)
#20 C:\websites\sitename\craft\vendor\twig\twig\lib\Twig\Template.php(367): craft\web\twig\Template->displayWithErrorHandling(Array, Array)
#21 C:\websites\sitename\craft\vendor\craftcms\cms\src\web\twig\Template.php(31): Twig_Template->display(Array, Array)
#22 C:\websites\sitename\craft\storage\runtime\compiled_templates\f1\f13f7c4e8944c04d846e31ed00e14a2608629f98720d53716d0af4c42c0406d5.php(94): craft\web\twig\Template->display(Array, Array)
#23 C:\websites\sitename\craft\vendor\twig\twig\lib\Twig\Template.php(390): __TwigTemplate_1c32b97c6410ddc5ca9b8ed7d632b5bccbdeb0d143fe0597ccd3c7f99a64b01d->doDisplay(Array, Array)
#24 C:\websites\sitename\craft\vendor\craftcms\cms\src\web\twig\Template.php(49): Twig_Template->displayWithErrorHandling(Array, Array)
#25 C:\websites\sitename\craft\vendor\twig\twig\lib\Twig\Template.php(367): craft\web\twig\Template->displayWithErrorHandling(Array, Array)
#26 C:\websites\sitename\craft\vendor\craftcms\cms\src\web\twig\Template.php(31): Twig_Template->display(Array, Array)
#27 C:\websites\sitename\craft\storage\runtime\compiled_templates\2f\2feefa4af3fc2f906821193bbbbf4e9ca21facd5b4b1b05d172ff99bc3ca9b0b.php(54): craft\web\twig\Template->display(Array, Array)
#28 C:\websites\sitename\craft\vendor\twig\twig\lib\Twig\Template.php(390): __TwigTemplate_72f43dcfebc59ef2bfc851cba046d85e43d849a897663768563cd8bc31054a3c->doDisplay(Array, Array)
#29 C:\websites\sitename\craft\vendor\craftcms\cms\src\web\twig\Template.php(49): Twig_Template->displayWithErrorHandling(Array, Array)
#30 C:\websites\sitename\craft\vendor\twig\twig\lib\Twig\Template.php(367): craft\web\twig\Template->displayWithErrorHandling(Array, Array)
#31 C:\websites\sitename\craft\vendor\craftcms\cms\src\web\twig\Template.php(31): Twig_Template->display(Array, Array)
#32 C:\websites\sitename\craft\storage\runtime\compiled_templates\9a\9af64376a506112ffe96902525865031f675496782739bd558893f01cdb9025f.php(45): craft\web\twig\Template->display(Array, Array)
#33 C:\websites\sitename\craft\vendor\twig\twig\lib\Twig\Template.php(390): __TwigTemplate_3c4744d30b21915bdce9ac235c7a319fea11ce6aabf873f2255e3c730b46e4d2->doDisplay(Array, Array)
#34 C:\websites\sitename\craft\vendor\craftcms\cms\src\web\twig\Template.php(49): Twig_Template->displayWithErrorHandling(Array, Array)
#35 C:\websites\sitename\craft\vendor\twig\twig\lib\Twig\Template.php(367): craft\web\twig\Template->displayWithErrorHandling(Array, Array)
#36 C:\websites\sitename\craft\vendor\craftcms\cms\src\web\twig\Template.php(31): Twig_Template->display(Array, Array)
#37 C:\websites\sitename\craft\vendor\twig\twig\lib\Twig\Template.php(375): craft\web\twig\Template->display(Array)
#38 C:\websites\sitename\craft\vendor\twig\twig\lib\Twig\Environment.php(289): Twig_Template->render(Array)
#39 C:\websites\sitename\craft\vendor\craftcms\cms\src\web\View.php(331): Twig_Environment->render('entries', Array)
#40 C:\websites\sitename\craft\vendor\craftcms\cms\src\web\View.php(378): craft\web\View->renderTemplate('entries', Array)
#41 C:\websites\sitename\craft\vendor\craftcms\cms\src\web\Controller.php(156): craft\web\View->renderPageTemplate('entries', Array)
#42 C:\websites\sitename\craft\vendor\craftcms\cms\src\controllers\TemplatesController.php(78): craft\web\Controller->renderTemplate('entries', Array)
#43 [internal function]: craft\controllers\TemplatesController->actionRender('entries', Array)
#44 C:\websites\sitename\craft\vendor\yiisoft\yii2\base\InlineAction.php(57): call_user_func_array(Array, Array)
#45 C:\websites\sitename\craft\vendor\yiisoft\yii2\base\Controller.php(157): yii\base\InlineAction->runWithParams(Array)
#46 C:\websites\sitename\craft\vendor\craftcms\cms\src\web\Controller.php(104): yii\base\Controller->runAction('render', Array)
#47 C:\websites\sitename\craft\vendor\yiisoft\yii2\base\Module.php(528): craft\web\Controller->runAction('render', Array)
#48 C:\websites\sitename\craft\vendor\craftcms\cms\src\web\Application.php(282): yii\base\Module->runAction('templates/rende...', Array)
#49 C:\websites\sitename\craft\vendor\yiisoft\yii2\web\Application.php(103): craft\web\Application->runAction('templates/rende...', Array)
#50 C:\websites\sitename\craft\vendor\craftcms\cms\src\web\Application.php(271): yii\web\Application->handleRequest(Object(craft\web\Request))
#51 C:\websites\sitename\craft\vendor\yiisoft\yii2\base\Application.php(386): craft\web\Application->handleRequest(Object(craft\web\Request))
#52 C:\websites\sitename\craft\web\index.php(21): yii\base\Application->run()
#53 {main}

Can i recover this on my local environment?

  • How did you pull the files down? If you have Composer installed on the command line, try running composer install from your project's root to pull in a fresh set of dependencies in the vendor folder. – Brad Bell Feb 28 at 19:37
  • I tried various methods. Zipped and pulled whole thing down including vendors etc. Then tried just pulling down the composer files and running composer install but was still getting the issues above. I finally resolved by uploading to my own hosting environment where it worked fine. Updated craft to latest version and all plugins. Then pulled down locally and working fine now. Must have been some issue with my local environment. – mmc501 Feb 28 at 21:37
  • Glad you're sorted... would you mind adding that as an official answer? – Brad Bell Feb 29 at 3:42
1

I ended up uploading the files to my own hosting environment where I updated it to the latest version of Craft and plugins etc. Then pulled down locally and it worked fine.

| improve this answer | |
  • I ran into something similar with a plugin called Neo. Instead of putting stuff up on a hosting environment, for local development, I just had to run "composer update" in my VM to get the latest in case anyone else runs into this issue. – Rob Erskine May 29 at 16:23

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.