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

Undefined index: hasDimensions #841

Closed
Tam opened this issue May 1, 2019 · 3 comments

Comments

Projects
None yet
3 participants
@Tam
Copy link

commented May 1, 2019

Description

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}

Steps to reproduce

  1. Upgrade from Craft 2

Additional info

  • Craft version: 2.7.4
  • PHP version: 7.0.33
  • Database driver & version: MySQL 5.7.26
@lukeholder

This comment has been minimized.

Copy link
Member

commented May 3, 2019

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?

@Tam

This comment has been minimized.

Copy link
Author

commented May 3, 2019

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.

@Tam Tam closed this May 3, 2019

@stevenvandemoortele

This comment has been minimized.

Copy link

commented May 7, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.