1

First of all I am new in CraftCms. I am trying to run the project local which I cloned, so I have a database which I must import to this project. now its giving this error when I finish importing the database "Unknown Property – yii\base\UnknownPropertyException Setting unknown property: craft\fields\Assets::branchLimit" any help will do.

for more detailed stack trace

yii\base\UnknownPropertyException: Setting unknown property: craft\fields\Assets::branchLimit in /Users/blessingjackson/Documents/northernleaf2023/vendor/yiisoft/yii2/base/Component.php:209
Stack trace:
#0 /Users/blessingjackson/Documents/northernleaf2023/vendor/yiisoft/yii2/BaseYii.php(558): yii\base\Component->__set('branchLimit', NULL)
#1 /Users/blessingjackson/Documents/northernleaf2023/vendor/yiisoft/yii2/base/BaseObject.php(107): yii\BaseYii::configure(Object(craft\fields\Assets), Array)
#2 /Users/blessingjackson/Documents/northernleaf2023/vendor/craftcms/cms/src/base/Model.php(78): yii\base\BaseObject->__construct(Array)
#3 /Users/blessingjackson/Documents/northernleaf2023/vendor/craftcms/cms/src/fields/BaseRelationField.php(252): craft\base\Model->__construct(Array)
#4 /Users/blessingjackson/Documents/northernleaf2023/vendor/craftcms/cms/src/fields/Assets.php(220): craft\fields\BaseRelationField->__construct(Array)
#5 [internal function]: craft\fields\Assets->__construct(Array)
#6 /Users/blessingjackson/Documents/northernleaf2023/vendor/yiisoft/yii2/di/Container.php(419): ReflectionClass->newInstanceArgs(Array)
#7 /Users/blessingjackson/Documents/northernleaf2023/vendor/yiisoft/yii2/di/Container.php(170): yii\di\Container->build('craft\\fields\\As...', Array, Array)
#8 /Users/blessingjackson/Documents/northernleaf2023/vendor/yiisoft/yii2/BaseYii.php(365): yii\di\Container->get('craft\\fields\\As...', Array, Array)
#9 /Users/blessingjackson/Documents/northernleaf2023/vendor/craftcms/cms/src/Craft.php(53): yii\BaseYii::createObject(Array, Array)
#10 /Users/blessingjackson/Documents/northernleaf2023/vendor/craftcms/cms/src/helpers/Component.php(121): Craft::createObject(Array)
#11 /Users/blessingjackson/Documents/northernleaf2023/vendor/craftcms/cms/src/services/Fields.php(593): craft\helpers\Component::createComponent(Array, 'craft\\base\\Fiel...')
#12 /Users/blessingjackson/Documents/northernleaf2023/vendor/craftcms/cms/src/services/Fields.php(618): craft\services\Fields->createField(Array)
#13 /Users/blessingjackson/Documents/northernleaf2023/vendor/craftcms/cms/src/services/Fields.php(647): craft\services\Fields->_fields(NULL)
#14 /Users/blessingjackson/Documents/northernleaf2023/vendor/craftcms/cms/src/elements/db/ElementQuery.php(1908): craft\services\Fields->getAllFields()
#15 /Users/blessingjackson/Documents/northernleaf2023/vendor/craftcms/cms/src/elements/db/ElementQuery.php(1277): craft\elements\db\ElementQuery->customFields()
#16 /Users/blessingjackson/Documents/northernleaf2023/vendor/yiisoft/yii2/db/QueryBuilder.php(227): craft\elements\db\ElementQuery->prepare(Object(craft\db\mysql\QueryBuilder))
#17 /Users/blessingjackson/Documents/northernleaf2023/vendor/yiisoft/yii2/db/Query.php(157): yii\db\QueryBuilder->build(Object(craft\elements\db\UserQuery))
#18 /Users/blessingjackson/Documents/northernleaf2023/vendor/yiisoft/yii2/db/Query.php(287): yii\db\Query->createCommand(Object(craft\db\Connection))
#19 /Users/blessingjackson/Documents/northernleaf2023/vendor/craftcms/cms/src/db/Query.php(180): yii\db\Query->one(NULL)
#20 /Users/blessingjackson/Documents/northernleaf2023/vendor/craftcms/cms/src/elements/db/ElementQuery.php(1440): craft\db\Query->one(NULL)
#21 /Users/blessingjackson/Documents/northernleaf2023/vendor/craftcms/cms/src/elements/User.php(535): craft\elements\db\ElementQuery->one()
#22 /Users/blessingjackson/Documents/northernleaf2023/vendor/yiisoft/yii2/web/User.php(697): craft\elements\User::findIdentity(1)
#23 /Users/blessingjackson/Documents/northernleaf2023/vendor/craftcms/cms/src/web/User.php(500): yii\web\User->renewAuthStatus()
#24 /Users/blessingjackson/Documents/northernleaf2023/vendor/yiisoft/yii2/web/User.php(198): craft\web\User->renewAuthStatus()
#25 /Users/blessingjackson/Documents/northernleaf2023/vendor/craftcms/cms/src/web/Application.php(423): yii\web\User->getIdentity()
#26 /Users/blessingjackson/Documents/northernleaf2023/vendor/craftcms/cms/src/web/Application.php(107): craft\web\Application->debugBootstrap()
#27 /Users/blessingjackson/Documents/northernleaf2023/vendor/yiisoft/yii2/base/BaseObject.php(109): craft\web\Application->init()
#28 /Users/blessingjackson/Documents/northernleaf2023/vendor/yiisoft/yii2/base/Application.php(204): yii\base\BaseObject->__construct(Array)
#29 [internal function]: yii\base\Application->__construct(Array)
#30 /Users/blessingjackson/Documents/northernleaf2023/vendor/yiisoft/yii2/di/Container.php(419): ReflectionClass->newInstanceArgs(Array)
#31 /Users/blessingjackson/Documents/northernleaf2023/vendor/yiisoft/yii2/di/Container.php(170): yii\di\Container->build('craft\\web\\Appli...', Array, Array)
#32 /Users/blessingjackson/Documents/northernleaf2023/vendor/yiisoft/yii2/BaseYii.php(365): yii\di\Container->get('craft\\web\\Appli...', Array, Array)
#33 /Users/blessingjackson/Documents/northernleaf2023/vendor/craftcms/cms/src/Craft.php(53): yii\BaseYii::createObject(Array, Array)
#34 /Users/blessingjackson/Documents/northernleaf2023/vendor/craftcms/cms/bootstrap/bootstrap.php(239): Craft::createObject(Array)
#35 /Users/blessingjackson/Documents/northernleaf2023/vendor/craftcms/cms/bootstrap/web.php(40): require('/Users/blessing...')
#36 /Users/blessingjackson/Documents/northernleaf2023/web/index.php(21): require('/Users/blessing...')
#37 {main}

This is only happening when I import the data base.

2
  • 1
    Please make an effort to properly formulate and format your question.
    – MoritzLost
    Commented Jul 19, 2023 at 9:49
  • 1
    @MoritzLost is it much better or I still need to do more formatting? Commented Jul 19, 2023 at 11:08

1 Answer 1

1

The most likely explanation is that you're trying to import a database dump that was created on a different version of Craft than the one you're running locally. The Assets::branchLimit property was introduced in Craft 4.4, so it's a quite recent addition.

Make sure that you're importing the database with the same version that was used to create the database dump. If you want to update to a newer version, first make sure your local installation is running the same version as the database version, then do the update once you have successfully imported the database and the site is working locally.

If your local installation is running Craft <4.4, update to 4.4.x first and then try to import the dump.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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