1

I am getting the error below after I migrated from another server I copied all the files and DB and did composer install on the root directory folder it asked to question

1.yiisoft/yii2-composer contains a Composer plugin which is currently not in your allow-plugins config. See https://getcomposer.org/allow-plugins Do you trust "yiisoft/yii2-composer" to execute code and wish to enable it now? (writes "allow-plugins" to composer.json) [y,n,d,?] y

  1. craftcms/plugin-installer contains a Composer plugin which is currently not in your allow-plugins config. See https://getcomposer.org/allow-plugins Do you trust "craftcms/plugin-installer" to execute code and wish to enable it now? (writes "allow-plugins" to composer.json) [y,n,d,?] y

these I answered yes and after that when I access the site this error is showing:

An Error occurred while handling another error:
yii\base\UnknownPropertyException: Setting unknown property: craft\models\Info::configVersion in /home2/cesinest/cesinvest.ae/vendor/yiisoft/yii2/base/Component.php:209
Stack trace:
#0 /home2/cesinest/cesinvest.ae/vendor/yiisoft/yii2/BaseYii.php(546): yii\base\Component->__set('configVersion', 'xfyshobxzgec')
#1 /home2/cesinest/cesinvest.ae/vendor/yiisoft/yii2/base/BaseObject.php(107): yii\BaseYii::configure(Object(craft\models\Info), Array)
#2 /home2/cesinest/cesinvest.ae/vendor/craftcms/cms/src/base/ApplicationTrait.php(614): yii\base\BaseObject->__construct(Array)
#3 /home2/cesinest/cesinvest.ae/vendor/craftcms/cms/src/base/ApplicationTrait.php(260): craft\web\Application->getInfo(true)
#4 /home2/cesinest/cesinvest.ae/vendor/craftcms/cms/src/services/Sites.php(1149): craft\web\Application->getIsInstalled()
#5 /home2/cesinest/cesinvest.ae/vendor/craftcms/cms/src/services/Sites.php(455): craft\services\Sites->_loadAllSites()
#6 /home2/cesinest/cesinvest.ae/vendor/yiisoft/yii2/base/Component.php(180): craft\services\Sites->setCurrentSite(NULL)
#7 /home2/cesinest/cesinvest.ae/vendor/yiisoft/yii2/BaseYii.php(546): yii\base\Component->__set('currentSite', NULL)
#8 /home2/cesinest/cesinvest.ae/vendor/yiisoft/yii2/base/BaseObject.php(107): yii\BaseYii::configure(Object(craft\services\Sites), Array)
#9 [internal function]: yii\base\BaseObject->__construct(Array)
#10 /home2/cesinest/cesinvest.ae/vendor/yiisoft/yii2/di/Container.php(384): ReflectionClass->newInstanceArgs(Array)
#11 /home2/cesinest/cesinvest.ae/vendor/yiisoft/yii2/di/Container.php(156): yii\di\Container->build('craft\\services\\...', Array, Array)
#12 /home2/cesinest/cesinvest.ae/vendor/yiisoft/yii2/BaseYii.php(349): yii\di\Container->get('craft\\services\\...', Array, Array)
#13 /home2/cesinest/cesinvest.ae/vendor/yiisoft/yii2/di/ServiceLocator.php(137): yii\BaseYii::createObject(Array)
#14 /home2/cesinest/cesinvest.ae/vendor/yiisoft/yii2/base/Module.php(742): yii\di\ServiceLocator->get('sites', true)
#15 /home2/cesinest/cesinvest.ae/vendor/craftcms/cms/src/web/Application.php(350): yii\base\Module->get('sites', true)
#16 /home2/cesinest/cesinvest.ae/vendor/craftcms/cms/src/base/ApplicationTrait.php(1193): craft\web\Application->get('sites')
#17 /home2/cesinest/cesinvest.ae/vendor/craftcms/cms/src/web/Request.php(187): craft\web\Application->getSites()
#18 /home2/cesinest/cesinvest.ae/vendor/yiisoft/yii2/base/BaseObject.php(109): craft\web\Request->init()
#19 [internal function]: yii\base\BaseObject->__construct(Array)
#20 /home2/cesinest/cesinvest.ae/vendor/yiisoft/yii2/di/Container.php(384): ReflectionClass->newInstanceArgs(Array)
#21 /home2/cesinest/cesinvest.ae/vendor/yiisoft/yii2/di/Container.php(156): yii\di\Container->build('craft\\web\\Reque...', Array, Array)
#22 /home2/cesinest/cesinvest.ae/vendor/yiisoft/yii2/BaseYii.php(349): yii\di\Container->get('craft\\web\\Reque...', Array, Array)
#23 /home2/cesinest/cesinvest.ae/vendor/craftcms/cms/src/config/app.web.php(13): yii\BaseYii::createObject(Array)
#24 [internal function]: {closure}()
#25 /home2/cesinest/cesinvest.ae/vendor/yiisoft/yii2/di/Container.php(508): call_user_func_array(Object(Closure), Array)
#26 /home2/cesinest/cesinvest.ae/vendor/yiisoft/yii2/BaseYii.php(351): yii\di\Container->invoke(Object(Closure), Array)
#27 /home2/cesinest/cesinvest.ae/vendor/yiisoft/yii2/di/ServiceLocator.php(137): yii\BaseYii::createObject(Object(Closure))
#28 /home2/cesinest/cesinvest.ae/vendor/yiisoft/yii2/base/Module.php(742): yii\di\ServiceLocator->get('request', true)
#29 /home2/cesinest/cesinvest.ae/vendor/craftcms/cms/src/web/Application.php(350): yii\base\Module->get('request', true)
#30 /home2/cesinest/cesinvest.ae/vendor/yiisoft/yii2/web/Application.php(160): craft\web\Application->get('request')
#31 /home2/cesinest/cesinvest.ae/vendor/craftcms/cms/src/helpers/App.php(667): yii\web\Application->getRequest()
#32 /home2/cesinest/cesinvest.ae/vendor/craftcms/cms/src/config/app.web.php(18): craft\helpers\App::webResponseConfig()
#33 [internal function]: {closure}()
#34 /home2/cesinest/cesinvest.ae/vendor/yiisoft/yii2/di/Container.php(508): call_user_func_array(Object(Closure), Array)
#35 /home2/cesinest/cesinvest.ae/vendor/yiisoft/yii2/BaseYii.php(351): yii\di\Container->invoke(Object(Closure), Array)
#36 /home2/cesinest/cesinvest.ae/vendor/yiisoft/yii2/di/ServiceLocator.php(137): yii\BaseYii::createObject(Object(Closure))
#37 /home2/cesinest/cesinvest.ae/vendor/yiisoft/yii2/base/Module.php(742): yii\di\ServiceLocator->get('response', true)
#38 /home2/cesinest/cesinvest.ae/vendor/craftcms/cms/src/web/Application.php(350): yii\base\Module->get('response', true)
#39 /home2/cesinest/cesinvest.ae/vendor/yiisoft/yii2/web/Application.php(169): craft\web\Application->get('response')
#40 /home2/cesinest/cesinvest.ae/vendor/yiisoft/yii2/web/ErrorHandler.php(92): yii\web\Application->getResponse()
#41 /home2/cesinest/cesinvest.ae/vendor/craftcms/cms/src/web/ErrorHandler.php(137): yii\web\ErrorHandler->renderException(Object(yii\base\UnknownPropertyException))
#42 /home2/cesinest/cesinvest.ae/vendor/yiisoft/yii2/base/ErrorHandler.php(111): craft\web\ErrorHandler->renderException(Object(yii\base\UnknownPropertyException))
#43 /home2/cesinest/cesinvest.ae/vendor/craftcms/cms/src/web/ErrorHandler.php(67): yii\base\ErrorHandler->handleException(Object(yii\base\UnknownPropertyException))
#44 [internal function]: craft\web\ErrorHandler->handleException(Object(yii\base\UnknownPropertyException))
#45 {main}
Previous exception:
yii\base\UnknownPropertyException: Setting unknown property: craft\models\Info::configVersion in /home2/cesinest/cesinvest.ae/vendor/yiisoft/yii2/base/Component.php:209
Stack trace:
#0 /home2/cesinest/cesinvest.ae/vendor/yiisoft/yii2/BaseYii.php(546): yii\base\Component->__set('configVersion', 'xfyshobxzgec')
#1 /home2/cesinest/cesinvest.ae/vendor/yiisoft/yii2/base/BaseObject.php(107): yii\BaseYii::configure(Object(craft\models\Info), Array)
#2 /home2/cesinest/cesinvest.ae/vendor/craftcms/cms/src/base/ApplicationTrait.php(614): yii\base\BaseObject->__construct(Array)
#3 /home2/cesinest/cesinvest.ae/vendor/craftcms/cms/src/base/ApplicationTrait.php(260): craft\web\Application->getInfo(true)
#4 /home2/cesinest/cesinvest.ae/vendor/craftcms/cms/src/services/Sites.php(1149): craft\web\Application->getIsInstalled()
#5 /home2/cesinest/cesinvest.ae/vendor/craftcms/cms/src/services/Sites.php(455): craft\services\Sites->_loadAllSites()
#6 /home2/cesinest/cesinvest.ae/vendor/yiisoft/yii2/base/Component.php(180): craft\services\Sites->setCurrentSite(NULL)
#7 /home2/cesinest/cesinvest.ae/vendor/yiisoft/yii2/BaseYii.php(546): yii\base\Component->__set('currentSite', NULL)
#8 /home2/cesinest/cesinvest.ae/vendor/yiisoft/yii2/base/BaseObject.php(107): yii\BaseYii::configure(Object(craft\services\Sites), Array)
#9 [internal function]: yii\base\BaseObject->__construct(Array)
#10 /home2/cesinest/cesinvest.ae/vendor/yiisoft/yii2/di/Container.php(384): ReflectionClass->newInstanceArgs(Array)
#11 /home2/cesinest/cesinvest.ae/vendor/yiisoft/yii2/di/Container.php(156): yii\di\Container->build('craft\\services\\...', Array, Array)
#12 /home2/cesinest/cesinvest.ae/vendor/yiisoft/yii2/BaseYii.php(349): yii\di\Container->get('craft\\services\\...', Array, Array)
#13 /home2/cesinest/cesinvest.ae/vendor/yiisoft/yii2/di/ServiceLocator.php(137): yii\BaseYii::createObject(Array)
#14 /home2/cesinest/cesinvest.ae/vendor/yiisoft/yii2/base/Module.php(742): yii\di\ServiceLocator->get('sites', true)
#15 /home2/cesinest/cesinvest.ae/vendor/craftcms/cms/src/web/Application.php(350): yii\base\Module->get('sites', true)
#16 /home2/cesinest/cesinvest.ae/vendor/craftcms/cms/src/base/ApplicationTrait.php(1193): craft\web\Application->get('sites')
#17 /home2/cesinest/cesinvest.ae/vendor/craftcms/cms/src/web/Request.php(187): craft\web\Application->getSites()
#18 /home2/cesinest/cesinvest.ae/vendor/yiisoft/yii2/base/BaseObject.php(109): craft\web\Request->init()
#19 [internal function]: yii\base\BaseObject->__construct(Array)
#20 /home2/cesinest/cesinvest.ae/vendor/yiisoft/yii2/di/Container.php(384): ReflectionClass->newInstanceArgs(Array)
#21 /home2/cesinest/cesinvest.ae/vendor/yiisoft/yii2/di/Container.php(156): yii\di\Container->build('craft\\web\\Reque...', Array, Array)
#22 /home2/cesinest/cesinvest.ae/vendor/yiisoft/yii2/BaseYii.php(349): yii\di\Container->get('craft\\web\\Reque...', Array, Array)
#23 /home2/cesinest/cesinvest.ae/vendor/craftcms/cms/src/config/app.web.php(13): yii\BaseYii::createObject(Array)
#24 [internal function]: {closure}()
#25 /home2/cesinest/cesinvest.ae/vendor/yiisoft/yii2/di/Container.php(508): call_user_func_array(Object(Closure), Array)
#26 /home2/cesinest/cesinvest.ae/vendor/yiisoft/yii2/BaseYii.php(351): yii\di\Container->invoke(Object(Closure), Array)
#27 /home2/cesinest/cesinvest.ae/vendor/yiisoft/yii2/di/ServiceLocator.php(137): yii\BaseYii::createObject(Object(Closure))
#28 /home2/cesinest/cesinvest.ae/vendor/yiisoft/yii2/base/Module.php(742): yii\di\ServiceLocator->get('request', true)
#29 /home2/cesinest/cesinvest.ae/vendor/craftcms/cms/src/web/Application.php(350): yii\base\Module->get('request', true)
#30 /home2/cesinest/cesinvest.ae/vendor/yiisoft/yii2/web/Application.php(160): craft\web\Application->get('request')
#31 /home2/cesinest/cesinvest.ae/vendor/craftcms/cms/src/helpers/App.php(491): yii\web\Application->getRequest()
#32 /home2/cesinest/cesinvest.ae/vendor/craftcms/cms/src/config/app.php(216): craft\helpers\App::logConfig()
#33 [internal function]: {closure}()
#34 /home2/cesinest/cesinvest.ae/vendor/yiisoft/yii2/di/Container.php(508): call_user_func_array(Object(Closure), Array)
#35 /home2/cesinest/cesinvest.ae/vendor/yiisoft/yii2/BaseYii.php(351): yii\di\Container->invoke(Object(Closure), Array)
#36 /home2/cesinest/cesinvest.ae/vendor/yiisoft/yii2/di/ServiceLocator.php(137): yii\BaseYii::createObject(Object(Closure))
#37 /home2/cesinest/cesinvest.ae/vendor/yiisoft/yii2/base/Module.php(742): yii\di\ServiceLocator->get('log', true)
#38 /home2/cesinest/cesinvest.ae/vendor/craftcms/cms/src/web/Application.php(350): yii\base\Module->get('log', true)
#39 /home2/cesinest/cesinvest.ae/vendor/yiisoft/yii2/base/Application.php(508): craft\web\Application->get('log')
#40 /home2/cesinest/cesinvest.ae/vendor/craftcms/cms/src/base/ApplicationTrait.php(1336): yii\base\Application->getLog()
#41 /home2/cesinest/cesinvest.ae/vendor/craftcms/cms/src/web/Application.php(109): craft\web\Application->_preInit()
#42 /home2/cesinest/cesinvest.ae/vendor/yiisoft/yii2/base/BaseObject.php(109): craft\web\Application->init()
#43 /home2/cesinest/cesinvest.ae/vendor/yiisoft/yii2/base/Application.php(206): yii\base\BaseObject->__construct(Array)
#44 /home2/cesinest/cesinvest.ae/vendor/craftcms/cms/src/web/Application.php(100): yii\base\Application->__construct(Array)
#45 [internal function]: craft\web\Application->__construct(Array)
#46 /home2/cesinest/cesinvest.ae/vendor/yiisoft/yii2/di/Container.php(384): ReflectionClass->newInstanceArgs(Array)
#47 /home2/cesinest/cesinvest.ae/vendor/yiisoft/yii2/di/Container.php(156): yii\di\Container->build('craft\\web\\Appli...', Array, Array)
#48 /home2/cesinest/cesinvest.ae/vendor/yiisoft/yii2/BaseYii.php(349): yii\di\Container->get('craft\\web\\Appli...', Array, Array)
#49 /home2/cesinest/cesinvest.ae/vendor/craftcms/cms/bootstrap/bootstrap.php(244): yii\BaseYii::createObject(Array)
#50 /home2/cesinest/cesinvest.ae/vendor/craftcms/cms/bootstrap/web.php(52): require('/home2/cesinest...')
#51 /home2/cesinest/cesinvest.ae/web/index.php(20): require('/home2/cesinest...')
#52 {main}

Please if any one can tell me what is wrong I'll be grateful

composer install gave these errors:

Your lock file does not contain a compatible set of packages. Please run composer update.

  Problem 1
    - craftcms/plugin-installer is locked to version 1.5.4 and an update of this package was not requested.
    - craftcms/plugin-installer 1.5.4 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.2.0] but it does not match the constraint.
  Problem 2
    - yiisoft/yii2-composer is locked to version 2.0.8 and an update of this package was not requested.
    - yiisoft/yii2-composer 2.0.8 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.2.0] but it does not match the constraint.
  Problem 3
    - craftcms/plugin-installer 1.5.4 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.2.0] but it does not match the constraint.
    - craftcms/cms 3.3.10 requires craftcms/plugin-installer ~1.5.3 -> satisfiable by craftcms/plugin-installer[1.5.4].
    - craftcms/cms is locked to version 3.3.10 and an update of this package was not requested.

I did the composer update then, I removed the vendor folder and re did the composer install but still it is showing the same error.

7
  • What version of Craft CMS is the site being migrated running? This looks similar to this situation here: github.com/craftcms/cms/issues/7007 May 28 at 15:19
  • Thanks for the reply, but this I tried and it didn't worked for me that is why I posted the question as there are many other similar solutions but nothing is working in my case
    – H_alt
    May 28 at 20:30
  • What is the Craft CMS version your site is running under though? When you migrated it, is the CMS version exactly the same? It seems to suggest that the version your site is lower than 3.5.6, but the error is referencing a property which only exists in 3.5.6: docs.craftcms.com/api/v3/craft-models-info.html#configversion. Has your project.yaml become out of sync? May 28 at 21:06
  • the version is exactly the same as the it was before as I only copied the files from that server to the new one, I didnt installed it again. If the project.yaml is out of sync how will I be able to fix that? can it be the cause of this problem?
    – H_alt
    May 29 at 7:34
  • Yes, but what is your current version of Craft CMS you are running. 3.4? 3.5 etc? That property suggests your DB schema has 3.5.6+ stuff in it, but vendor might be Craft 3.4? To sync project config try: ./craft project-config/apply. May 29 at 9:08

1 Answer 1

2

Troubleshooting this in a separate discussion, the issue is that the DB has a version and schemaVersion of 3.7.x, where as the composer project is fixed at 3.3.10. At some point something has attempted to upgrade the Craft CMS site to 3.7.x and now the project is out of sync.

The best course of action at this point is to restore the database from a known good DB backup, given something has clearly modified the database with Craft CMS 3.7 related changes, but the original project was 3.3.10.

Alternatively, the composer dependency for Craft CMS can be updated with the ^ symbol so the dependency is no longer locked to a specific version, this is also best practice for keeping with updates, but you should be testing the site on a development environment on each update, before going into production.

Although this does highlight the danger of locking composer package versions, in most cases the caret should be used on versions like ^3.4.

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.