You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[5.x]: Changes to the project config are not possible while in read-only mode when viewing updates #17750
Hmm, seems I cannot reproduce this anymore, currently on 5.8.15. Only see some plugin updates, perhaps it behaves different when there is a Craft update but I doubt it. Will report back when there is a new Craft update and will close it if the issue is gone.
I got it again, let me know what I can do to help.
{
"trace": [
"#0 /cms/app/vendor/craftcms/cms/src/services/ProjectConfig.php(526): craft\\services\\ProjectConfig->_setInternal()",
"#1 /cms/app/vendor/craftcms/cms/src/services/Plugins.php(1193): craft\\services\\ProjectConfig->set()",
"#2 /cms/app/vendor/craftcms/cms/src/helpers/Api.php(203): craft\\services\\Plugins->setPluginLicenseKey()",
"#3 /cms/app/vendor/craftcms/cms/src/controllers/AppController.php(172): craft\\helpers\\Api::processResponseHeaders()",
"#4 [internal function]: craft\\controllers\\AppController->actionProcessApiResponseHeaders()",
"#5 /cms/app/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array()",
"#6 /cms/app/vendor/yiisoft/yii2/base/Controller.php(178): yii\\base\\InlineAction->runWithParams()",
"#7 /cms/app/vendor/yiisoft/yii2/base/Module.php(552): yii\\base\\Controller->runAction()",
"#8 /cms/app/vendor/craftcms/cms/src/web/Application.php(360): yii\\base\\Module->runAction()",
"#9 /cms/app/vendor/craftcms/cms/src/web/Application.php(659): craft\\web\\Application->runAction()",
"#10 /cms/app/vendor/craftcms/cms/src/web/Application.php(322): craft\\web\\Application->_processActionRequest()",
"#11 /cms/app/vendor/yiisoft/yii2/base/Application.php(384): craft\\web\\Application->handleRequest()",
"#12 /cms/app/web/index.php(21): yii\\base\\Application->run()",
"#13 {main}"
],
"memory": 8923440,
"exception": "[object] (yii\\base\\NotSupportedException(code: 0): Changes to the project config are not possible while in read-only mode. at /cms/app/vendor/craftcms/cms/src/services/ProjectConfig.php:554)"
}
Looks to me that there is a plugin without a license key? We have a plugin that's internal, not via the plugin store though. Is this something wrong on our end?
Well, I re-installed Blitz few commits ago and it did not generate the licenseKey in the YAML - mistake on my end. But perhaps this can also be prevented in the future?
I recently encountered this issue whilst upgrading a Craft 5 to 5.10.3 from v 5.9.20. Here is my stacktrace according to the error logs:
2026-05-27 14:07:23 [web.INFO] [craft\db\MigrationManager::migrateUp] Applying m260401_155236_min_authors_setting {"memory":4097896}
2026-05-27 14:07:23 [web.ERROR] [craft\db\MigrationManager::migrateUp] Failed to apply m260401_155236_min_authors_setting (time: 0.196s). Output:
> add column minAuthors smallint UNSIGNED NOT NULL DEFAULT 1 AFTER `enableVersioning` to table {{%sections}} ... done (time: 0.169s)
Exception: Changes to the project config are not possible while in read-only mode. (/var/www/html/vendor/craftcms/cms/src/services/ProjectConfig.php:556)
#0 /var/www/html/vendor/craftcms/cms/src/services/ProjectConfig.php(528): craft\services\ProjectConfig->_setInternal()
#1 /var/www/html/vendor/craftcms/cms/src/services/Entries.php(608): craft\services\ProjectConfig->set()
#2 /var/www/html/vendor/craftcms/cms/src/migrations/m260401_155236_min_authors_setting.php(29): craft\services\Entries->saveSection()
#3 /var/www/html/vendor/craftcms/cms/src/db/Migration.php(50): craft\migrations\m260401_155236_min_authors_setting->safeUp()
#4 /var/www/html/vendor/craftcms/cms/src/db/MigrationManager.php(233): craft\db\Migration->up()
#5 /var/www/html/vendor/craftcms/cms/src/db/MigrationManager.php(149): craft\db\MigrationManager->migrateUp()
#6 /var/www/html/vendor/craftcms/cms/src/services/Updates.php(246): craft\db\MigrationManager->up()
#7 /var/www/html/vendor/craftcms/cms/src/controllers/BaseUpdaterController.php(498): craft\services\Updates->runMigrations()
#8 /var/www/html/vendor/craftcms/cms/src/controllers/UpdaterController.php(195): craft\controllers\BaseUpdaterController->runMigrations()
#9 [internal function]: craft\controllers\UpdaterController->actionMigrate()
#10 /var/www/html/vendor/yiisoft/yii2/base/InlineAction.php(60): call_user_func_array()
#11 /var/www/html/vendor/yiisoft/yii2/base/Controller.php(182): yii\base\InlineAction->runWithParams()
#12 /var/www/html/vendor/yiisoft/yii2/base/Module.php(547): yii\base\Controller->runAction()
#13 /var/www/html/vendor/craftcms/cms/src/web/Application.php(368): yii\base\Module->runAction()
#14 /var/www/html/vendor/craftcms/cms/src/web/Application.php(728): craft\web\Application->runAction()
#15 /var/www/html/vendor/craftcms/cms/src/web/Application.php(257): craft\web\Application->_processUpdateLogic()
#16 /var/www/html/vendor/yiisoft/yii2/base/Application.php(382): craft\web\Application->handleRequest()
#17 /var/www/html/web/index.php(21): yii\base\Application->run()
#18 {main}
{"memory":4332704}
2026-05-27 14:07:23 [web.ERROR] [craft\db\MigrationManager::up] Migration failed. The rest of the migrations are cancelled. {"memory":4338920}
2026-05-27 14:07:23 [web.ERROR] [craft\controllers\BaseUpdaterController::runMigrations] craft\migrations\m260401_155236_min_authors_setting migration failed: Changes to the project config are not possible while in read-only mode. {"memory":4333640}
2026-05-27 14:07:23 [web.ERROR] [yii\base\NotSupportedException] yii\base\NotSupportedException: Changes to the project config are not possible while in read-only mode. in /var/www/html/vendor/craftcms/cms/src/services/ProjectConfig.php:556
It also appears to apply some migrations, fails at this one in particular, which then leaves the database in a partially migrated state, meaning it now fails due to "duplicate columns" that were created earlier in the migration and not reverted by the Migrate tool that appears when you go to /admin after deployment. This means we then have to put a DB backup in place and revert.
If we run the deployment with admin changes allowed, we don't get the problem, which seems counterintuitive, as surely deployment and applying of updated composer and yaml files should allow for Db changes without being beholden to this setting.
@jamesevans1808 The expectation is that you first update Craft on a local environment where admin changes are allowed. If you are updating via Composer, ensure you always run craft up after the update so any pending migrations are run.
Then you commit your composer.json + composer.lock changes with any changes within config/project/, and deploy all those changes together.
If you deploy the project config changes along with the Composer changes, then you won’t hit that error when migrations are run on production.
It also appears to apply some migrations, fails at this one in particular, which then leaves the database in a partially migrated state, meaning it now fails due to "duplicate columns" that were created earlier in the migration and not reverted by the Migrate tool that appears when you go to /admin after deployment. This means we then have to put a DB backup in place and revert.
@jamesevans1808 Do you have a database backup from Craft 5.9.20? If so can you please send that, along with the composer.json + composer.lock files and project config files you deployed (post-local 5.10 upgrade) over to support@craftcms.com?
@brandonkelly we're unable to send a database backup, as that would be a breach of GDPR. Looking at my notes, here is the complete process we did for the relevant upgrades that failed for us:
Logged into the CMS, navigated to the Updates utility
Pressed the "Update all" button
Waiting for the process to finish
Pressed the "Finish Up" button to apply database changes
Committed all the files that were changed. No yaml changes were present in these instances after using the Upgrade utility.
Deployed to a test environment using Deployer 7.2
Navigated to /admin
Pressed the "Finish Up" button to apply database changes
Fails due to Read-Only
SSH to test environment, alter general.php config to allowAdminChanges => true
Pressed the "Finish Up" button to apply database changes
Fails due to duplicate columns as shown in previous stack trace
No yaml changes were present in these instances after using the Upgrade utility.
That should definitely not have been the case when upgrading from 5.9 to 5.10, as 5.10 included new migrations, which would at the least update the dateModified and system.schemaVersion values.
Activity
linear commentedon Aug 16, 2025
CMS-1546 [5.x]: Changes to the project config are not possible while in read-only mode when viewing updates
brandonkelly commentedon Aug 17, 2025
Can you post the full stack trace for the error from your logs?
Thijmen commentedon Aug 19, 2025
Hmm, seems I cannot reproduce this anymore, currently on 5.8.15. Only see some plugin updates, perhaps it behaves different when there is a Craft update but I doubt it. Will report back when there is a new Craft update and will close it if the issue is gone.
Thijmen commentedon Sep 1, 2025
I got it again, let me know what I can do to help.
{ "trace": [ "#0 /cms/app/vendor/craftcms/cms/src/services/ProjectConfig.php(526): craft\\services\\ProjectConfig->_setInternal()", "#1 /cms/app/vendor/craftcms/cms/src/services/Plugins.php(1193): craft\\services\\ProjectConfig->set()", "#2 /cms/app/vendor/craftcms/cms/src/helpers/Api.php(203): craft\\services\\Plugins->setPluginLicenseKey()", "#3 /cms/app/vendor/craftcms/cms/src/controllers/AppController.php(172): craft\\helpers\\Api::processResponseHeaders()", "#4 [internal function]: craft\\controllers\\AppController->actionProcessApiResponseHeaders()", "#5 /cms/app/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array()", "#6 /cms/app/vendor/yiisoft/yii2/base/Controller.php(178): yii\\base\\InlineAction->runWithParams()", "#7 /cms/app/vendor/yiisoft/yii2/base/Module.php(552): yii\\base\\Controller->runAction()", "#8 /cms/app/vendor/craftcms/cms/src/web/Application.php(360): yii\\base\\Module->runAction()", "#9 /cms/app/vendor/craftcms/cms/src/web/Application.php(659): craft\\web\\Application->runAction()", "#10 /cms/app/vendor/craftcms/cms/src/web/Application.php(322): craft\\web\\Application->_processActionRequest()", "#11 /cms/app/vendor/yiisoft/yii2/base/Application.php(384): craft\\web\\Application->handleRequest()", "#12 /cms/app/web/index.php(21): yii\\base\\Application->run()", "#13 {main}" ], "memory": 8923440, "exception": "[object] (yii\\base\\NotSupportedException(code: 0): Changes to the project config are not possible while in read-only mode. at /cms/app/vendor/craftcms/cms/src/services/ProjectConfig.php:554)" }Looks to me that there is a plugin without a license key? We have a plugin that's internal, not via the plugin store though. Is this something wrong on our end?
Thijmen commentedon Sep 1, 2025
Well, I re-installed Blitz few commits ago and it did not generate the licenseKey in the YAML - mistake on my end. But perhaps this can also be prevented in the future?
jamesevans1808 commentedon May 28, 2026
I recently encountered this issue whilst upgrading a Craft 5 to 5.10.3 from v 5.9.20. Here is my stacktrace according to the error logs:
It also appears to apply some migrations, fails at this one in particular, which then leaves the database in a partially migrated state, meaning it now fails due to "duplicate columns" that were created earlier in the migration and not reverted by the Migrate tool that appears when you go to /admin after deployment. This means we then have to put a DB backup in place and revert.
If we run the deployment with admin changes allowed, we don't get the problem, which seems counterintuitive, as surely deployment and applying of updated composer and yaml files should allow for Db changes without being beholden to this setting.
brandonkelly commentedon May 28, 2026
@jamesevans1808 The expectation is that you first update Craft on a local environment where admin changes are allowed. If you are updating via Composer, ensure you always run
craft upafter the update so any pending migrations are run.Then you commit your
composer.json+composer.lockchanges with any changes withinconfig/project/, and deploy all those changes together.If you deploy the project config changes along with the Composer changes, then you won’t hit that error when migrations are run on production.
Yes, that’s expected.
jamesevans1808 commentedon May 28, 2026
brandonkelly commentedon May 28, 2026
@jamesevans1808 Do you have a database backup from Craft 5.9.20? If so can you please send that, along with the
composer.json+composer.lockfiles and project config files you deployed (post-local 5.10 upgrade) over to support@craftcms.com?jamesevans1808 commentedon May 29, 2026
@brandonkelly we're unable to send a database backup, as that would be a breach of GDPR. Looking at my notes, here is the complete process we did for the relevant upgrades that failed for us:
Hope that helps.
brandonkelly commentedon Jun 1, 2026
That should definitely not have been the case when upgrading from 5.9 to 5.10, as 5.10 included new migrations, which would at the least update the
dateModifiedandsystem.schemaVersionvalues.fix: Skip automatic plugin license writes in read-only mode