Closed sarahschuetz closed 3 years ago
UPDATE: manually removing 'dateDeleted' from the deleted site in the 'sites' table fixes the error, so the problem is definitely the deleted site. Removing 'dateDeleted' - updating - adding 'dateDeleted' is a good enough workaround at the moment for me. But it might still be interesting to you. :)
Huh, weird, when you delete a site, any section settings associated with that site should get automatically deleted as well. Just tested locally and didn’t have any trouble updating a Craft 3.3 install, with a soft-deleted site, and a Single section that was once enabled for that site.
Do you still have a database backup from before the 3.4 update? If so, can you please send it along with your composer.json
and composer.lock
files, over to support@craftcms.com?
@brandonkelly
Hi Brandon – Martin here, a colleague of Sarah. We're getting an error with the same migration again, although it seems to be related to a different problem. This time, we tried to go from Craft 3.3.3 to Craft 3.6.10 (latest as of today). All the Composer packages are on their latest versions as well.
*** applying m190913_152146_update_preview_targets
Exception: Setting unknown property: nystudio107\seomatic\models\MetaSiteVars::referrer (/Users/martin/Documents/xx/___dist/vendor/yiisoft/yii2/base/Component.php:210)
#0 /Users/martin/Documents/xx/___dist/vendor/yiisoft/yii2/BaseYii.php(558): yii\base\Component->__set('referrer', 'no-referrer-whe...')
#1 /Users/martin/Documents/xx/___dist/vendor/yiisoft/yii2/base/BaseObject.php(107): yii\BaseYii::configure(Object(nystudio107\seomatic\models\MetaSiteVars), Array)
#2 /Users/martin/Documents/xx/___dist/vendor/nystudio107/craft-seomatic/src/models/MetaSiteVars.php(43): yii\base\BaseObject->__construct(Array)
#3 /Users/martin/Documents/xx/___dist/vendor/nystudio107/craft-seomatic/src/models/MetaBundle.php(174): nystudio107\seomatic\models\MetaSiteVars::create(Array)
#4 /Users/martin/Documents/xx/vendor/nystudio107/craft-seomatic/src/models/MetaBundle.php(144): nystudio107\seomatic\models\MetaBundle->normalizeMetaBundleData(true)
#5 /Users/martin/Documents/xx/___dist/vendor/nystudio107/craft-seomatic/src/services/MetaBundles.php(227): nystudio107\seomatic\models\MetaBundle::create(Array)
#6 /Users/martin/Documents/xx/___dist/vendor/nystudio107/craft-seomatic/src/fields/SeoSettings.php(251): nystudio107\seomatic\services\MetaBundles->getMetaBundleBySourceId('section', 3, 1)
#7 /Users/martin/Documents/xx/___dist/vendor/craftcms/cms/src/base/Element.php(1879): nystudio107\seomatic\fields\SeoSettings->serializeValue(Object(nystudio107\seomatic\models\MetaBundle), Object(craft\elements\Entry))
#8 /Users/martin/Documents/xx/___dist/vendor/yiisoft/yii2/validators/InlineValidator.php(84): craft\base\Element->validateCustomFieldContentSize('pluginSeomaticN...', NULL, Object(yii\validators\InlineValidator), Object(nystudio107\seomatic\models\MetaBundle))
#9 /Users/martin/Documents/xx/___dist/vendor/yiisoft/yii2/validators/Validator.php(261): yii\validators\InlineValidator->validateAttribute(Object(craft\elements\Entry), 'pluginSeomaticN...')
#10 /Users/martin/Documents/xx/___dist/vendor/yiisoft/yii2/base/Model.php(368): yii\validators\Validator->validateAttributes(Object(craft\elements\Entry), Array)
#11 /Users/martin/Documents/xx/___dist/vendor/craftcms/cms/src/services/Sections.php(1515): yii\base\Model->validate()
#12 /Users/martin/Documents/xx/___dist/vendor/craftcms/cms/src/services/Sections.php(748): craft\services\Sections->_ensureSingleEntry(Object(craft\models\Section), Array)
#13 /Users/martin/Documents/xx/___dist/vendor/craftcms/cms/src/base/ApplicationTrait.php(1664): craft\services\Sections->handleChangedSection(Object(craft\events\ConfigEvent))
#14 /Users/martin/Documents/xx/___dist/vendor/craftcms/cms/src/services/ProjectConfig.php(1181): craft\console\Application->craft\base\{closure}(Object(craft\events\ConfigEvent))
#15 [internal function]: craft\services\ProjectConfig->handleChangeEvent(Object(craft\events\ConfigEvent))
#16 /Users/martin/Documents/xx/___dist/vendor/yiisoft/yii2/base/Component.php(628): call_user_func(Array, Object(craft\events\ConfigEvent))
#17 /Users/martin/Documents/xx/___dist/vendor/craftcms/cms/src/services/ProjectConfig.php(744): yii\base\Component->trigger('updateItem', Object(craft\events\ConfigEvent))
#18 /Users/martin/Documents/xx/___dist/vendor/craftcms/cms/src/services/ProjectConfig.php(1171): craft\services\ProjectConfig->_processConfigChangesInternal('sections.18ce40...')
#19 [internal function]: craft\services\ProjectConfig->handleChangeEvent(Object(craft\events\ConfigEvent))
#20 /Users/martin/Documents/xx/___dist/vendor/yiisoft/yii2/base/Component.php(628): call_user_func(Array, Object(craft\events\ConfigEvent))
#21 /Users/martin/Documents/xx/___dist/vendor/craftcms/cms/src/services/ProjectConfig.php(741): yii\base\Component->trigger('addItem', Object(craft\events\ConfigEvent))
#22 /Users/martin/Documents/xx/___dist/vendor/craftcms/cms/src/services/ProjectConfig.php(517): craft\services\ProjectConfig->_processConfigChangesInternal('sections.18ce40...', true, NULL)
#23 /Users/martin/Documents/xx/___dist/vendor/craftcms/cms/src/migrations/m190913_152146_update_preview_targets.php(54): craft\services\ProjectConfig->set('sections.18ce40...', Array)
#24 /Users/martin/Documents/xx/___dist/vendor/craftcms/cms/src/db/Migration.php(52): craft\migrations\m190913_152146_update_preview_targets->safeUp()
#25 /Users/martin/Documents/xx/___dist/vendor/yiisoft/yii2/console/controllers/BaseMigrateController.php(744): craft\db\Migration->up()
#26 /Users/martin/Documents/xx/___dist/vendor/yiisoft/yii2/console/controllers/BaseMigrateController.php(202): yii\console\controllers\BaseMigrateController->migrateUp('m190913_152146_...')
#27 /Users/martin/Documents/xx/___dist/vendor/craftcms/cms/src/console/controllers/MigrateController.php(415): yii\console\controllers\BaseMigrateController->actionUp(0)
#28 [internal function]: craft\console\controllers\MigrateController->actionUp(0)
#29 /Users/martin/Documents/xx/___dist/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#30 /Users/martin/Documents/xx/___dist/vendor/yiisoft/yii2/base/Controller.php(181): yii\base\InlineAction->runWithParams(Array)
#31 /Users/martin/Documents/xx/___dist/vendor/yiisoft/yii2/console/Controller.php(184): yii\base\Controller->runAction('up', Array)
#32 /Users/martin/Documents/xx/___dist/vendor/yiisoft/yii2/base/Module.php(534): yii\console\Controller->runAction('up', Array)
#33 /Users/martin/Documents/xx/___dist/vendor/yiisoft/yii2/console/Application.php(181): yii\base\Module->runAction('migrate/up', Array)
#34 /Users/martin/Documents/xx/___dist/vendor/craftcms/cms/src/console/Application.php(89): yii\console\Application->runAction('migrate/up', Array)
#35 /Users/martin/Documents/xx/___dist/vendor/yiisoft/yii2/console/Application.php(148): craft\console\Application->runAction('migrate/up', Array)
#36 /Users/martin/Documents/xx/___dist/vendor/yiisoft/yii2/base/Application.php(392): yii\console\Application->handleRequest(Object(craft\console\Request))
#37 /Users/martin/Documents/xx/___dist/craft(22): yii\base\Application->run()
#38 {main}
*** failed to apply m190913_152146_update_preview_targets (time: 0.617s)
1 from 32 migration was applied.
Migration failed. The rest of the migrations are canceled.
Since this seems to be related to a migration of SEOmatic, maybe @khalwat might have more insight?
@martinhellwagner That error is coming from SEOmatic. Not sure what to make of it as nystudio107\seomatic\models\ MetaSiteVars::$referrer
is an actual property, though:
yeah I can't imagine what this could be except perhaps a somehow borked composer install?
I've cleared the Composer caches, double-checked that every plugin was indeed on its latest version, removed the vendor
folder as well as the composer.lock
file, and tried again – success! 😍
Currently migrating a Craft 2 website to 3. The same migration failed on Craft 3.7.4 but looks like due to an unrelated issue:
#0 /var/www/vendor/yiisoft/yii2/db/BaseActiveRecord.php(324): yii\base\Component->__set('defaultPlacemen...', 'end')
#1 /var/www/vendor/craftcms/cms/src/db/ActiveRecord.php(54): yii\db\BaseActiveRecord->__set('defaultPlacemen...', 'end')
#2 /var/www/vendor/craftcms/cms/src/services/Sections.php(586): craft\db\ActiveRecord->__set('defaultPlacemen...', 'end')
#3 /var/www/vendor/craftcms/cms/src/base/ApplicationTrait.php(1668): craft\services\Sections->handleChangedSection(Object(craft\events\ConfigEvent))
#4 /var/www/vendor/craftcms/cms/src/services/ProjectConfig.php(1189): craft\console\Application->craft\base\{closure}(Object(craft\events\ConfigEvent))
#5 [internal function]: craft\services\ProjectConfig->handleChangeEvent(Object(craft\events\ConfigEvent))
#6 /var/www/vendor/yiisoft/yii2/base/Component.php(628): call_user_func(Array, Object(craft\events\ConfigEvent))
#7 /var/www/vendor/craftcms/cms/src/services/ProjectConfig.php(752): yii\base\Component->trigger('updateItem', Object(craft\events\ConfigEvent))
#8 /var/www/vendor/craftcms/cms/src/services/ProjectConfig.php(1179): craft\services\ProjectConfig->_processConfigChangesInternal('sections.8f688f...')
#9 [internal function]: craft\services\ProjectConfig->handleChangeEvent(Object(craft\events\ConfigEvent))
#10 /var/www/vendor/yiisoft/yii2/base/Component.php(628): call_user_func(Array, Object(craft\events\ConfigEvent))
#11 /var/www/vendor/craftcms/cms/src/services/ProjectConfig.php(749): yii\base\Component->trigger('addItem', Object(craft\events\ConfigEvent))
#12 /var/www/vendor/craftcms/cms/src/services/ProjectConfig.php(521): craft\services\ProjectConfig->_processConfigChangesInternal('sections.8f688f...', true, NULL)
#13 /var/www/vendor/craftcms/cms/src/migrations/m190913_152146_update_preview_targets.php(54): craft\services\ProjectConfig->set('sections.8f688f...', Array)
#14 /var/www/vendor/craftcms/cms/src/db/Migration.php(52): craft\migrations\m190913_152146_update_preview_targets->safeUp()
#15 /var/www/vendor/yiisoft/yii2/console/controllers/BaseMigrateController.php(744): craft\db\Migration->up()
#16 /var/www/vendor/craftcms/cms/src/console/controllers/MigrateController.php(379): yii\console\controllers\BaseMigrateController->migrateUp('m190913_152146_...')
#17 [internal function]: craft\console\controllers\MigrateController->actionAll()
#18 /var/www/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#19 /var/www/vendor/yiisoft/yii2/base/Controller.php(181): yii\base\InlineAction->runWithParams(Array)
#20 /var/www/vendor/yiisoft/yii2/console/Controller.php(184): yii\base\Controller->runAction('all', Array)
#21 /var/www/vendor/yiisoft/yii2/base/Module.php(534): yii\console\Controller->runAction('all', Array)
#22 /var/www/vendor/yiisoft/yii2/console/Application.php(181): yii\base\Module->runAction('migrate/all', Array)
#23 /var/www/vendor/craftcms/cms/src/console/Application.php(89): yii\console\Application->runAction('migrate/all', Array)
#24 /var/www/vendor/yiisoft/yii2/console/Application.php(148): craft\console\Application->runAction('migrate/all', Array)
#25 /var/www/vendor/yiisoft/yii2/base/Application.php(392): yii\console\Application->handleRequest(Object(craft\console\Request))
#26 /var/www/craft(28): yii\base\Application->run()
#27 {main}
*** failed to apply m190913_152146_update_preview_targets (time: 0.034s)
146 from 185 migrations were applied.
I downgraded to Craft 3.6 and upgraded to 3.7 afterwards to make the migrations work.
Hey @Wiejeben, can you please send your Craft 2 database backup, plus your new composer.json
and composer.lock
files, over to support@craftcms.com?
@Wiejeben That ended up being the same error as #9624. Fixed for the next release!
Description
I tried updating from Craft CMS 3.3.18.2 to 3.4.4.1 It doesn't matter if migrations are installed using the 'Finish' button or console -> same error
Stack Trace:
Additional Info
I tried the update already a couple of days ago and it worked fine. I just reverted because of troubles with the spoon plugin. Now that that's fixed, I finally want to update. In the meanwhile one of the multisites was deleted (soft-delete). Might that be an issue?