Getting the following error when upgrading from Craft 2/Commerce 1 to Craft 3/Commerce 2.
Exception: Undefined index: hasDimensions (/var/www/vhosts/.../vendor/craftcms/commerce/src/migrations/m181206_120000_remaining_project_config_support.php:119)
#0 /var/www/vhosts/.../vendor/craftcms/commerce/src/migrations/m181206_120000_remaining_project_config_support.php(119): yii\base\ErrorHandler->handleError(8, 'Undefined index...', '/var/www/vhosts...', 119, Array)
#1 /var/www/vhosts/.../vendor/craftcms/commerce/src/migrations/m181206_120000_remaining_project_config_support.php(58): craft\commerce\migrations\m181206_120000_remaining_project_config_support->_getProductTypeData()
#2 /var/www/vhosts/.../vendor/craftcms/cms/src/db/Migration.php(56): craft\commerce\migrations\m181206_120000_remaining_project_config_support->safeUp()
#3 /var/www/vhosts/.../vendor/craftcms/cms/src/db/MigrationManager.php(243): craft\db\Migration->up(true)
#4 /var/www/vhosts/.../vendor/craftcms/cms/src/db/MigrationManager.php(163): craft\db\MigrationManager->migrateUp(Object(craft\commerce\migrations\m181206_120000_remaining_project_config_support))
#5 /var/www/vhosts/.../vendor/craftcms/cms/src/services/Updates.php(225): craft\db\MigrationManager->up()
#6 /var/www/vhosts/.../vendor/craftcms/cms/src/console/controllers/MigrateController.php(252): craft\services\Updates->runMigrations(Array)
#7 [internal function]: craft\console\controllers\MigrateController->actionAll()
#8 /var/www/vhosts/.../vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#9 /var/www/vhosts/.../vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction->runWithParams(Array)
#10 /var/www/vhosts/.../vendor/yiisoft/yii2/console/Controller.php(148): yii\base\Controller->runAction('all', Array)
#11 /var/www/vhosts/.../vendor/yiisoft/yii2/base/Module.php(528): yii\console\Controller->runAction('all', Array)
#12 /var/www/vhosts/.../vendor/yiisoft/yii2/console/Application.php(180): yii\base\Module->runAction('migrate/all', Array)
#13 /var/www/vhosts/.../vendor/craftcms/cms/src/console/Application.php(93): yii\console\Application->runAction('migrate/all', Array)
#14 /var/www/vhosts/.../vendor/yiisoft/yii2/console/Application.php(147): craft\console\Application->runAction('migrate/all', Array)
#15 /var/www/vhosts/.../vendor/yiisoft/yii2/base/Application.php(386): yii\console\Application->handleRequest(Object(craft\console\Request))
#16 /var/www/vhosts/.../craft(23): yii\base\Application->run()
#17 {main}
Does your pre-updated database not have the hasDimensions column in the commerce_producttypes table? That column has been there from the beginning of commerce so not sure how it would be missing?
I couldn't tell you. We ended up downgrading Commerce to 2.1.3.1 and running the upgrade on that then updating to the latest Commerce, which worked fine.
I had the same issue upgrading from craftcms 3.0 & commerce2@beta to the latest version.
First upgrading commerce to 2.1.3.1 like @Tam suggested also fixed my problem
I'm having the same issue coming from the beta version. Perhaps it wasn't present in the beta?
I have just fixed this on the develop branch.
Any idea when this will be released?
@nateiler just cut the release 2.1.7
Most helpful comment
I have just fixed this on the develop branch.