1

I'm receiving an Undefined index: siteSettings when trying to save changes to entry types (both new and existing). Of course, this is only occurring on a production server - local server with up-to-date copies of the DB is working as expected. Also, we're not using project config.

yii\base\ErrorException: Undefined index: siteSettings in /chroot/home/sitename/vendor/craftcms/cms/src/services/Sections.php:608
Stack trace:
#0 /chroot/home/sitename/vendor/craftcms/cms/src/web/ErrorHandler.php(80): yii\base\ErrorHandler->handleError(8, 'Undefined index...', '/chroot/home/ly...', 608)
#1 /chroot/home/sitename/vendor/craftcms/cms/src/services/Sections.php(608): craft\web\ErrorHandler->handleError(8, 'Undefined index...', '/chroot/home/ly...', 608, Array)
#2 /chroot/home/sitename/vendor/craftcms/cms/src/services/ProjectConfig.php(872): craft\services\Sections->handleChangedSection(Object(craft\events\ConfigEvent))
#3 [internal function]: craft\services\ProjectConfig->craft\services\{closure}(Object(craft\events\ConfigEvent))
#4 /chroot/home/sitename/vendor/yiisoft/yii2/base/Component.php(627): call_user_func(Object(Closure), Object(craft\events\ConfigEvent))
#5 /chroot/home/sitename/vendor/craftcms/cms/src/services/ProjectConfig.php(551): yii\base\Component->trigger('addItem', Object(craft\events\ConfigEvent))
#6 /chroot/home/sitename/vendor/craftcms/cms/src/services/ProjectConfig.php(866): craft\services\ProjectConfig->processConfigChanges('sections.0ad0be...')
#7 [internal function]: craft\services\ProjectConfig->craft\services\{closure}(Object(craft\events\ConfigEvent))
#8 /chroot/home/sitename/vendor/yiisoft/yii2/base/Component.php(627): call_user_func(Object(Closure), Object(craft\events\ConfigEvent))
#9 /chroot/home/sitename/vendor/craftcms/cms/src/services/ProjectConfig.php(551): yii\base\Component->trigger('addItem', Object(craft\events\ConfigEvent))
#10 /chroot/home/sitename/vendor/craftcms/cms/src/services/ProjectConfig.php(395): craft\services\ProjectConfig->processConfigChanges('sections.0ad0be...', true)
#11 /chroot/home/sitename/vendor/craftcms/cms/src/services/Sections.php(1174): craft\services\ProjectConfig->set('sections.0ad0be...', Array)
#12 /chroot/home/sitename/vendor/craftcms/cms/src/controllers/SectionsController.php(374): craft\services\Sections->saveEntryType(Object(craft\models\EntryType))
#13 [internal function]: craft\controllers\SectionsController->actionSaveEntryType()
#14 /chroot/home/sitename/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#15 /chroot/home/sitename/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction->runWithParams(Array)
#16 /chroot/home/sitename/vendor/craftcms/cms/src/web/Controller.php(187): yii\base\Controller->runAction('save-entry-type', Array)
#17 /chroot/home/sitename/vendor/yiisoft/yii2/base/Module.php(528): craft\web\Controller->runAction('save-entry-type', Array)
#18 /chroot/home/sitename/vendor/craftcms/cms/src/web/Application.php(299): yii\base\Module->runAction('sections/save-e...', Array)
#19 /chroot/home/sitename/vendor/craftcms/cms/src/web/Application.php(565): craft\web\Application->runAction('sections/save-e...', Array)
#20 /chroot/home/sitename/vendor/craftcms/cms/src/web/Application.php(278): craft\web\Application->_processActionRequest(Object(craft\web\Request))
#21 /chroot/home/sitename/vendor/yiisoft/yii2/base/Application.php(386): craft\web\Application->handleRequest(Object(craft\web\Request))
#22 /chroot/home/sitename/html/index.php(23): yii\base\Application->run()
#23 {main}

Application Info

PHP version: 7.1.33
OS version: Linux 2.6.32-754.18.2.el6.x86_64
Database driver & version: MySQL 5.6.43
Image driver & version: Imagick 3.4.3RC1 (ImageMagick 6.7.2-7)
Craft edition & version: Craft Pro 3.3.19
Yii version: 2.0.31
Twig version: 2.12.3
Guzzle version: 6.5.1
Imagine version: 1.2.3-dev

1

Even with 'useProjectConfigFile' => false, it is still active under the hood.

Could you run ./craft project-config/rebuild and see if that fixes the issue please?

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.