We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Looks like the utils/prune-provisional-drafts console command uses the old column name sourceId instead of the new name canonicalId.
utils/prune-provisional-drafts
sourceId
canonicalId
craft utils/prune-provisional-drafts
provisional drafts get pruned
The following exception gets thrown:
Finding elements with multiple provisional drafts per user ... Exception 'yii\db\Exception' with message 'SQLSTATE[42S22]: Column not found: 1054 Unknown column 'sourceId' in 'field list' The SQL being executed was: SELECT `s`.`sourceId` AS `id`, `s`.`creatorId`, `s`.`count`, (SELECT `type` FROM `elements` WHERE `id` = `s`.`sourceId`) AS `type` FROM (SELECT `sourceId`, `creatorId`, COUNT(*) AS `count` FROM `drafts` WHERE `provisional`=TRUE GROUP BY `sourceId`, `creatorId` HAVING COUNT(*) > 1) `s`' in /app/app/vendor/yiisoft/yii2/db/Schema.php:676 Error Info: Array ( [0] => 42S22 [1] => 1054 [2] => Unknown column 'sourceId' in 'field list' ) Caused by: Exception 'PDOException' with message 'SQLSTATE[42S22]: Column not found: 1054 Unknown column 'sourceId' in 'field list'' in /app/app/vendor/yiisoft/yii2/db/Command.php:1302 Stack trace: #0 /app/app/vendor/yiisoft/yii2/db/Command.php(1302): PDOStatement->execute() #1 /app/app/vendor/yiisoft/yii2/db/Command.php(1168): yii\db\Command->internalExecute('SELECT `s`.`sou...') #2 /app/app/vendor/yiisoft/yii2/db/Command.php(410): yii\db\Command->queryInternal('fetchAll', NULL) #3 /app/app/vendor/yiisoft/yii2/db/Query.php(249): yii\db\Command->queryAll() #4 /app/app/vendor/craftcms/cms/src/db/Query.php(153): yii\db\Query->all(NULL) #5 /app/app/vendor/craftcms/cms/src/console/controllers/utils/PruneProvisionalDraftsController.php(68): craft\db\Query->all() #6 [internal function]: craft\console\controllers\utils\PruneProvisionalDraftsController->actionIndex() #7 /app/app/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array) #8 /app/app/vendor/yiisoft/yii2/base/Controller.php(178): yii\base\InlineAction->runWithParams(Array) #9 /app/app/vendor/yiisoft/yii2/console/Controller.php(182): yii\base\Controller->runAction('', Array) #10 /app/app/vendor/craftcms/cms/src/console/Controller.php(224): yii\console\Controller->runAction('', Array) #11 /app/app/vendor/yiisoft/yii2/base/Module.php(552): craft\console\Controller->runAction('', Array) #12 /app/app/vendor/yiisoft/yii2/console/Application.php(180): yii\base\Module->runAction('utils/prune-pro...', Array) #13 /app/app/vendor/craftcms/cms/src/console/Application.php(90): yii\console\Application->runAction('utils/prune-pro...', Array) #14 /app/app/vendor/yiisoft/yii2/console/Application.php(147): craft\console\Application->runAction('utils/prune-pro...', Array) #15 /app/app/vendor/craftcms/cms/src/console/Application.php(121): yii\console\Application->handleRequest(Object(craft\console\Request)) #16 /app/app/vendor/yiisoft/yii2/base/Application.php(384): craft\console\Application->handleRequest(Object(craft\console\Request)) #17 /app/app/craft(13): yii\base\Application->run() #18 {main}
4.1.0.2
8.0.13
Linux 5.10.104-linuxkit
MySQL 8.0.29
Imagick @PACKAGE_VERSION@ (ImageMagick 7.0.11-14)
The text was updated successfully, but these errors were encountered:
f666285
Thanks for reporting that! Craft 4.1.1 is out now with a fix.
Sorry, something went wrong.
No branches or pull requests
What happened?
Description
Looks like the
utils/prune-provisional-drafts
console command uses the old column namesourceId
instead of the new namecanonicalId
.Steps to reproduce
craft utils/prune-provisional-drafts
in a terminalExpected behavior
provisional drafts get pruned
Actual behavior
The following exception gets thrown:
Craft CMS version
4.1.0.2
PHP version
8.0.13
Operating system and version
Linux 5.10.104-linuxkit
Database type and version
MySQL 8.0.29
Image driver and version
Imagick @PACKAGE_VERSION@ (ImageMagick 7.0.11-14)
Installed plugins and versions
The text was updated successfully, but these errors were encountered: