1

When I run ./craft gc I get the following error:

Running garbage collection ... Exception 'yii\base\InvalidConfigException' with message 'Invalid section ID: 30'

The Section ID of 30 that it's referencing is one of the deleted

EDIT: Adding Stack Trace (Craft Pro 3.4.9):

Delete all trashed items? (yes|no) [no]:yes
Running garbage collection ... Exception 'yii\base\InvalidConfigException' with message 'Invalid section ID: 30'

in /srv/www/website.com/vendor/craftcms/cms/src/elements/Entry.php:836

Stack trace:
#0 /srv/www/website.com/vendor/craftcms/cms/src/elements/Entry.php(867): craft\elements\Entry->getSection()
#1 /srv/www/website.com/vendor/craftcms/cms/src/elements/Entry.php(812): craft\elements\Entry->getType()
#2 /srv/www/website.com/vendor/craftcms/cms/src/base/Element.php(2740): craft\elements\Entry->getFieldLayout()
#3 /srv/www/website.com/vendor/craftcms/cms/src/base/Element.php(2564): craft\base\Element->fieldLayoutFields()
#4 /srv/www/website.com/vendor/craftcms/cms/src/elements/Entry.php(1287): craft\base\Element->beforeDelete()
#5 /srv/www/website.com/vendor/craftcms/cms/src/services/Elements.php(1213): craft\elements\Entry->beforeDelete()
#6 /srv/www/website.com/vendor/craftcms/cms/src/services/Drafts.php(474): craft\services\Elements->deleteElement(Object(craft\elements\Entry), true)
#7 /srv/www/website.com/vendor/craftcms/cms/src/services/Gc.php(57): craft\services\Drafts->purgeUnsavedDrafts()
#8 /srv/www/website.com/vendor/craftcms/cms/src/console/controllers/GcController.php(56): craft\services\Gc->run(true)
#9 [internal function]: craft\console\controllers\GcController->actionRun()
#10 /srv/www/website.com/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#11 /srv/www/website.com/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction->runWithParams(Array)
#12 /srv/www/website.com/vendor/yiisoft/yii2/console/Controller.php(164): yii\base\Controller->runAction('', Array)
#13 /srv/www/website.com/vendor/craftcms/cms/src/console/Controller.php(187): yii\console\Controller->runAction('', Array)
#14 /srv/www/website.com/vendor/yiisoft/yii2/base/Module.php(528): craft\console\Controller->runAction('', Array)
#15 /srv/www/website.com/vendor/yiisoft/yii2/console/Application.php(180): yii\base\Module->runAction('gc', Array)
#16 /srv/www/website.com/vendor/craftcms/cms/src/console/Application.php(87): yii\console\Application->runAction('gc', Array)
#17 /srv/www/website.com/vendor/yiisoft/yii2/console/Application.php(147): craft\console\Application->runAction('gc', Array)
#18 /srv/www/website.com/vendor/yiisoft/yii2/base/Application.php(386): yii\console\Application->handleRequest(Object(craft\console\Request))
#19 /srv/www/website.com/craft(22): yii\base\Application->run()
#20 {main}
  • Can you share the full stack trace leading up to the error? – Brad Bell Nov 15 '19 at 22:37
  • Added the stack trace — hopefully that helps. – Adrian Feb 29 at 16:40
1

This will be fixed in Craft 3.4.11, per craftcms/cms#5820.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.