Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal error after installing on an upgraded installation (Craft 2 -> Craft 3) #18

Open
sgtpenguin opened this issue Aug 24, 2020 · 1 comment
Labels

Comments

@sgtpenguin
Copy link

Description

Upgrading a site from Craft 2 to 3 (sooo many issues with plugins so far :-/ ). After installing the Google Cloud plugin I get this error.

yii\base\UnknownPropertyException: Setting unknown property: craft\googlecloud\Volume::keyId in /Users/dylan/Sites/vera-c3/vendor/yiisoft/yii2/base/Component.php:209 Stack trace: #0 /Users/dylan/Sites/vera-c3/vendor/yiisoft/yii2/BaseYii.php(558): yii\base\Component->__set('keyId', 'GOOGW2547XFRTRC...') #1 /Users/dylan/Sites/vera-c3/vendor/yiisoft/yii2/base/BaseObject.php(107): yii\BaseYii::configure(Object(craft\googlecloud\Volume), Array) #2 /Users/dylan/Sites/vera-c3/vendor/craftcms/google-cloud/src/Volume.php(98): yii\base\BaseObject->__construct(Array) #3 [internal function]: craft\googlecloud\Volume->__construct(Array) #4 /Users/dylan/Sites/vera-c3/vendor/yiisoft/yii2/di/Container.php(400): ReflectionClass->newInstanceArgs(Array) #5 /Users/dylan/Sites/vera-c3/vendor/yiisoft/yii2/di/Container.php(159): yii\di\Container->build('craft\\googleclo...', Array, Array) #6 /Users/dylan/Sites/vera-c3/vendor/yiisoft/yii2/BaseYii.php(365): yii\di\Container->get('craft\\googleclo...', Array, Array) #7 /Users/dylan/Sites/vera-c3/vendor/craftcms/cms/src/helpers/Component.php(111): yii\BaseYii::createObject(Array) #8 /Users/dylan/Sites/vera-c3/vendor/craftcms/cms/src/services/Volumes.php(524): craft\helpers\Component::createComponent(Array, 'craft\\base\\Volu...') #9 /Users/dylan/Sites/vera-c3/vendor/craftcms/cms/src/services/Volumes.php(217): craft\services\Volumes->createVolume(Array) #10 /Users/dylan/Sites/vera-c3/vendor/craftcms/cms/src/services/Volumes.php(231): craft\services\Volumes->getAllVolumes() #11 /Users/dylan/Sites/vera-c3/vendor/craftcms/cms/src/models/VolumeFolder.php(89): craft\services\Volumes->getVolumeById(1) #12 /Users/dylan/Sites/vera-c3/vendor/craftcms/cms/src/fields/Assets.php(955): craft\models\VolumeFolder->getVolume() #13 /Users/dylan/Sites/vera-c3/vendor/craftcms/cms/src/fields/Assets.php(184): craft\fields\Assets->_folderSourceToVolumeSource('folder:49e5f11c...') #14 /Users/dylan/Sites/vera-c3/vendor/yiisoft/yii2/base/BaseObject.php(109): craft\fields\Assets->init() #15 /Users/dylan/Sites/vera-c3/vendor/craftcms/cms/src/fields/BaseRelationField.php(224): yii\base\BaseObject->__construct(Array) #16 /Users/dylan/Sites/vera-c3/vendor/craftcms/cms/src/fields/Assets.php(170): craft\fields\BaseRelationField->__construct(Array) #17 [internal function]: craft\fields\Assets->__construct(Array) #18 /Users/dylan/Sites/vera-c3/vendor/yiisoft/yii2/di/Container.php(400): ReflectionClass->newInstanceArgs(Array) #19 /Users/dylan/Sites/vera-c3/vendor/yiisoft/yii2/di/Container.php(159): yii\di\Container->build('craft\\fields\\As...', Array, Array) #20 /Users/dylan/Sites/vera-c3/vendor/yiisoft/yii2/BaseYii.php(365): yii\di\Container->get('craft\\fields\\As...', Array, Array) #21 /Users/dylan/Sites/vera-c3/vendor/craftcms/cms/src/helpers/Component.php(111): yii\BaseYii::createObject(Array) #22 /Users/dylan/Sites/vera-c3/vendor/craftcms/cms/src/services/Fields.php(548): craft\helpers\Component::createComponent(Array, 'craft\\base\\Fiel...') #23 /Users/dylan/Sites/vera-c3/vendor/craftcms/cms/src/services/Fields.php(573): craft\services\Fields->createField(Array) #24 /Users/dylan/Sites/vera-c3/vendor/craftcms/cms/src/elements/db/ElementQuery.php(1990): craft\services\Fields->getAllFields() #25 /Users/dylan/Sites/vera-c3/vendor/craftcms/cms/src/elements/db/ElementQuery.php(1351): craft\elements\db\ElementQuery->customFields() #26 /Users/dylan/Sites/vera-c3/vendor/yiisoft/yii2/db/QueryBuilder.php(227): craft\elements\db\ElementQuery->prepare(Object(craft\db\mysql\QueryBuilder)) #27 /Users/dylan/Sites/vera-c3/vendor/yiisoft/yii2/db/Query.php(157): yii\db\QueryBuilder->build(Object(craft\elements\db\UserQuery)) #28 /Users/dylan/Sites/vera-c3/vendor/yiisoft/yii2/db/Query.php(285): yii\db\Query->createCommand(Object(craft\db\Connection)) #29 /Users/dylan/Sites/vera-c3/vendor/craftcms/cms/src/db/Query.php(168): yii\db\Query->one(NULL) #30 /Users/dylan/Sites/vera-c3/vendor/craftcms/cms/src/elements/db/ElementQuery.php(1496): craft\db\Query->one(NULL) #31 /Users/dylan/Sites/vera-c3/vendor/craftcms/cms/src/elements/User.php(400): craft\elements\db\ElementQuery->one() #32 /Users/dylan/Sites/vera-c3/vendor/yiisoft/yii2/web/User.php(692): craft\elements\User::findIdentity(129) #33 /Users/dylan/Sites/vera-c3/vendor/craftcms/cms/src/web/User.php(485): yii\web\User->renewAuthStatus() #34 /Users/dylan/Sites/vera-c3/vendor/yiisoft/yii2/web/User.php(194): craft\web\User->renewAuthStatus() #35 /Users/dylan/Sites/vera-c3/vendor/craftcms/cms/src/web/Application.php(419): yii\web\User->getIdentity() #36 /Users/dylan/Sites/vera-c3/vendor/craftcms/cms/src/web/Application.php(106): craft\web\Application->debugBootstrap() #37 /Users/dylan/Sites/vera-c3/vendor/yiisoft/yii2/base/BaseObject.php(109): craft\web\Application->init() #38 /Users/dylan/Sites/vera-c3/vendor/yiisoft/yii2/base/Application.php(206): yii\base\BaseObject->__construct(Array) #39 /Users/dylan/Sites/vera-c3/vendor/craftcms/cms/src/web/Application.php(92): yii\base\Application->__construct(Array) #40 [internal function]: craft\web\Application->__construct(Array) #41 /Users/dylan/Sites/vera-c3/vendor/yiisoft/yii2/di/Container.php(400): ReflectionClass->newInstanceArgs(Array) #42 /Users/dylan/Sites/vera-c3/vendor/yiisoft/yii2/di/Container.php(159): yii\di\Container->build('craft\\web\\Appli...', Array, Array) #43 /Users/dylan/Sites/vera-c3/vendor/yiisoft/yii2/BaseYii.php(365): yii\di\Container->get('craft\\web\\Appli...', Array, Array) #44 /Users/dylan/Sites/vera-c3/vendor/craftcms/cms/bootstrap/bootstrap.php(245): yii\BaseYii::createObject(Array) #45 /Users/dylan/Sites/vera-c3/vendor/craftcms/cms/bootstrap/web.php(51): require('/Users/dylan/Si...') #46 /Users/dylan/Sites/vera-c3/web/index.php(21): require('/Users/dylan/Si...') #47 {main}

Steps to reproduce

Additional info

  • Craft version:
  • PHP version:
  • Database driver & version:
  • Plugins & versions:
@sgtpenguin sgtpenguin added the bug label Aug 24, 2020
@sgtpenguin
Copy link
Author

After some digging in the code and seeing what the migration does, I was able to work around this by manually deleting the keyId, secret, and urlPrefix props from the config objects in the database and re-adding the settings in the admin panel.

For some reason the _convertVolumes migration isn't running.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant