Closed nickdunn closed 3 years ago
Here’s the original error you got:
Exception: Undefined index: name (/var/www/craft/vendor/craftcms/cms/src/services/Globals.php:335)
Here’s that line:
So it’s saying you have a global set without a name
which… shouldn’t be possible? Can you take a look at your global sets and see if that’s the case?
I found a way to reproduce this, if there were any soft-deleted global sets. Just fixed it for the next release.
3.7.0-beta.3 is out now with that fix.
Tried again with 3.7.0-beta.3 and it's all good, thanks!
Thanks for checking!
I got this issue whil upgrading from 3.6.17 to 3.7.0 (non-beta)
> add column sortOrder smallint UNSIGNED AFTER `fieldLayoutId` to table {{%globalsets}} ...Exception: SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'sortOrder'
The SQL being executed was: ALTER TABLE `hcm_globalsets` ADD `sortOrder` smallint(6) UNSIGNED AFTER `fieldLayoutId` (/app/app/vendor/yiisoft/yii2/db/Schema.php:678)
#0 /app/app/vendor/yiisoft/yii2/db/Command.php(1307): yii\db\Schema->convertException(Object(PDOException), 'ALTER TABLE `hc...')
#1 /app/app/vendor/yiisoft/yii2/db/Command.php(1102): yii\db\Command->internalExecute('ALTER TABLE `hc...')
#2 /app/app/vendor/yiisoft/yii2/db/Migration.php(377): yii\db\Command->execute()
#3 /app/app/vendor/craftcms/cms/src/migrations/m210613_145522_sortable_global_sets.php(23): yii\db\Migration->addColumn('{{%globalsets}}', 'sortOrder', Object(craft\db\mysql\ColumnSchemaBuilder))
#4 /app/app/vendor/craftcms/cms/src/db/Migration.php(52): craft\migrations\m210613_145522_sortable_global_sets->safeUp()
#5 /app/app/vendor/yiisoft/yii2/console/controllers/BaseMigrateController.php(744): craft\db\Migration->up()
#6 /app/app/vendor/craftcms/cms/src/console/controllers/MigrateController.php(379): yii\console\controllers\BaseMigrateController->migrateUp('m210613_145522_...')
#7 [internal function]: craft\console\controllers\MigrateController->actionAll()
#8 /app/app/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#9 /app/app/vendor/yiisoft/yii2/base/Controller.php(181): yii\base\InlineAction->runWithParams(Array)
#10 /app/app/vendor/yiisoft/yii2/console/Controller.php(184): yii\base\Controller->runAction('all', Array)
#11 /app/app/vendor/yiisoft/yii2/base/Module.php(534): yii\console\Controller->runAction('all', Array)
#12 /app/app/vendor/yiisoft/yii2/console/Application.php(181): yii\base\Module->runAction('migrate/all', Array)
#13 /app/app/vendor/craftcms/cms/src/console/Application.php(89): yii\console\Application->runAction('migrate/all', Array)
#14 /app/app/vendor/yiisoft/yii2/console/Application.php(148): craft\console\Application->runAction('migrate/all', Array)
#15 /app/app/vendor/yiisoft/yii2/base/Application.php(392): yii\console\Application->handleRequest(Object(craft\console\Request))
#16 /app/app/craft(22): yii\base\Application->run()
#17 {main}
*** failed to apply m210613_145522_sortable_global_sets (time: 0.037s)```
Any idea how to fix it?
@elfacht Those “Column already exists” errors typically occur when you attempt to update once, it fails for some reason, and then you re-attempt the update without restoring a database backup first.
Please do the following:
composer.lock
file for "name": "craftcms/cms"
.)@brandonkelly Tried it, still got the error.
@brandonkelly I even tried an older backup (3.6.12 => 3.7.7) and still got this.
@elfacht In that case can you please send your 3.6.12 database backup plus your composer.json
+ composer.lock
files, over to support@craftcms.com? We can look into it from there.
@brandonkelly Done. I sent you the 3.6.17 files since this is the production version. If you need the 3.6.12 just say so and I'll send it, too.
Description
"craftcms/cms": "^3.7.0-beta.1",
composer update
I get this when I perform the upgrade. If I restore the previous database I can recreate this each time.
In the CP it then tells me:
So I hit "Finish up" which yields:
Additional info