Closed fancy-pug closed 1 week ago
The command php craft up returns with an error, when upgrading from 4.13 to 5.5.0. But it works when upgrading from 4.13 to 5.4.10.1 and so to 5.5.0
Usual upgrade as described on https://craftcms.com/docs/5.x/upgrade.html
Migrations will be applied
Exception: Class "craft\elements\MatrixBlock" not found (/Users/www/dev/project/vendor/craftcms/cms/src/models/FieldLayout.php:270) #0 /Users/www/dev/project/vendor/yiisoft/yii2/base/BaseObject.php(109): craft\models\FieldLayout->init() #1 /Users/www/dev/project/vendor/craftcms/cms/src/base/Model.php(87): yii\base\BaseObject->__construct() #2 [internal function]: craft\base\Model->__construct(Array) #3 /Users/www/dev/project/vendor/yiisoft/yii2/di/Container.php(419): ReflectionClass->newInstanceArgs(Array) #4 /Users/www/dev/project/vendor/yiisoft/yii2/di/Container.php(170): yii\di\Container->build('craft\\models\\Fi...', Array, Array) #5 /Users/www/dev/project/vendor/yiisoft/yii2/BaseYii.php(365): yii\di\Container->get('craft\\models\\Fi...', Array, Array) #6 /Users/www/dev/project/vendor/craftcms/cms/src/Craft.php(70): yii\BaseYii::createObject(Array, Array) #7 /Users/www/dev/project/vendor/craftcms/cms/src/services/Fields.php(1069): Craft::createObject(Array) #8 /Users/www/dev/project/vendor/craftcms/cms/src/services/Fields.php(904): craft\services\Fields->createLayout(Array) #9 [internal function]: craft\services\Fields->craft\services\{closure}(Array, 3) #10 /Users/www/dev/project/vendor/craftcms/cms/src/base/MemoizableArray.php(90): call_user_func(Object(Closure), Array, 3) #11 /Users/www/dev/project/vendor/craftcms/cms/src/base/MemoizableArray.php(76): craft\base\MemoizableArray->normalizeByKey(3) #12 [internal function]: craft\base\MemoizableArray->craft\base\{closure}(3) #13 /Users/www/dev/project/vendor/craftcms/cms/src/base/MemoizableArray.php(76): array_map(Object(Closure), Array) #14 /Users/www/dev/project/vendor/craftcms/cms/src/base/MemoizableArray.php(104): craft\base\MemoizableArray->normalize(Array) #15 /Users/www/dev/project/vendor/craftcms/cms/src/services/Fields.php(996): craft\base\MemoizableArray->all() #16 /Users/www/dev/project/vendor/craftcms/cms/src/migrations/m230511_000000_field_layout_configs.php(25): craft\services\Fields->getAllLayouts() #17 /Users/www/dev/project/vendor/craftcms/cms/src/db/Migration.php(50): craft\migrations\m230511_000000_field_layout_configs->safeUp() #18 /Users/www/dev/project/vendor/yiisoft/yii2/console/controllers/BaseMigrateController.php(758): craft\db\Migration->up() #19 /Users/www/dev/project/vendor/craftcms/cms/src/console/controllers/MigrateController.php(382): yii\console\controllers\BaseMigrateController->migrateUp('m230511_000000_...') #20 [internal function]: craft\console\controllers\MigrateController->actionAll() #21 /Users/www/dev/project/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array) #22 /Users/www/dev/project/vendor/yiisoft/yii2/base/Controller.php(178): yii\base\InlineAction->runWithParams(Array) #23 /Users/www/dev/project/vendor/yiisoft/yii2/console/Controller.php(180): yii\base\Controller->runAction('all', Array) #24 /Users/www/dev/project/vendor/craftcms/cms/src/console/controllers/MigrateController.php(195): yii\console\Controller->runAction('all', Array) #25 /Users/www/dev/project/vendor/yiisoft/yii2/base/Module.php(552): craft\console\controllers\MigrateController->runAction('all', Array) #26 /Users/www/dev/project/vendor/yiisoft/yii2/console/Application.php(180): yii\base\Module->runAction('migrate/all', Array) #27 /Users/www/dev/project/vendor/craftcms/cms/src/console/Application.php(91): yii\console\Application->runAction('migrate/all', Array) #28 /Users/www/dev/project/vendor/yiisoft/yii2/base/Controller.php(212): craft\console\Application->runAction('migrate/all', Array) #29 /Users/www/dev/project/vendor/craftcms/cms/src/console/Controller.php(207): yii\base\Controller->run('migrate/all', Array) #30 /Users/www/dev/project/vendor/craftcms/cms/src/console/controllers/UpController.php(60): craft\console\Controller->run('migrate/all', Array) #31 [internal function]: craft\console\controllers\UpController->actionIndex() #32 /Users/www/dev/project/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array) #33 /Users/www/dev/project/vendor/yiisoft/yii2/base/Controller.php(178): yii\base\InlineAction->runWithParams(Array) #34 /Users/www/dev/project/vendor/yiisoft/yii2/console/Controller.php(180): yii\base\Controller->runAction('', Array) #35 /Users/www/dev/project/vendor/craftcms/cms/src/console/ControllerTrait.php(88): yii\console\Controller->runAction('', Array) #36 /Users/www/dev/project/vendor/craftcms/cms/src/console/Controller.php(216): craft\console\Controller->traitRunAction('', Array) #37 /Users/www/dev/project/vendor/yiisoft/yii2/base/Module.php(552): craft\console\Controller->runAction('', Array) #38 /Users/www/dev/project/vendor/yiisoft/yii2/console/Application.php(180): yii\base\Module->runAction('up', Array) #39 /Users/www/dev/project/vendor/craftcms/cms/src/console/Application.php(91): yii\console\Application->runAction('up', Array) #40 /Users/www/dev/project/vendor/yiisoft/yii2/console/Application.php(147): craft\console\Application->runAction('up', Array) #41 /Users/www/dev/project/vendor/craftcms/cms/src/console/Application.php(122): yii\console\Application->handleRequest(Object(craft\console\Request)) #42 /Users/www/dev/project/vendor/yiisoft/yii2/base/Application.php(384): craft\console\Application->handleRequest(Object(craft\console\Request)) #43 /Users/www/dev/project/craft(13): yii\base\Application->run() #44 {main} *** failed to apply m230511_000000_field_layout_configs (time: 0.024s)
5.5.0
8.2
No response
-
Hi, thanks for reporting! Sounds like it’s the same root cause as #16095. PR is already raised.
Same issue here, update from craft 4 to 5.4.10.1 worked
Craft 5.5.0.1 is out with that fix. Thanks again!
What happened?
Description
The command php craft up returns with an error, when upgrading from 4.13 to 5.5.0. But it works when upgrading from 4.13 to 5.4.10.1 and so to 5.5.0
Steps to reproduce
Usual upgrade as described on https://craftcms.com/docs/5.x/upgrade.html
Expected behavior
Migrations will be applied
Actual behavior
Craft CMS version
5.5.0
PHP version
8.2
Operating system and version
No response
Database type and version
No response
Image driver and version
No response
Installed plugins and versions
-