#107997Saving changes in Site Configuration breaks config
Description
For example, when changing the domain when going live with a new site in our multi site installation, the config.yaml gets corrupted. Therefore we always edit the config.yaml file directly, and automatic cache clearing does not happen.
Example: Change from https://temporary-domain.dk to https://live-domain.dk
config.yaml before saving:
base: 'https://temporary-domain.dk'
baseVariants:
-
base: '%env(DKM_INSTANCE_HOST)%/3skursus/'
condition: 'applicationContext != "Production/Live"'
rootPageId: 1061
pids:
news:
storage: '1062'
detail: '1063'
events:
storage: '1064'
detail: '1065'
intranet:
storage: '1082'
root: '1081'
mail:
storage: '3909'
websiteTitle: '3S Kursus'
imports:
-
resource: 'EXT:mspconfig/Configuration/Site/Default.yaml'
config.yaml after saving:
DKMYouTube:
channels:
- __UNSET
base: 'https://live-domain.dk'
baseVariants:
-
base: 'https://71061.dkmweb4v12.ddev.site'
condition: 'applicationContext != "Production/Live"'
-
base: dkmweb4v12.ddev.site/3skursus/
dynamic_be_groups:
config_name:
conditions:
-
value: '73909'
env_config_key: 2019old
env_instanceHost: dkmweb4v12.ddev.site
env_typo3_context: Development
env_typo3_path_app: /var/www/html
errorHandling:
-
errorCode: 404
errorContentSource: 't3://page?uid=71061'
-
errorCode: 403
errorContentSource: 't3://page?uid=71061'
languages:
-
languageId: 0
solr_core_read: dkmweb4_dk
matomoWidgetsActiveWidgets: ''
matomoWidgetsIdSite: ''
matomoWidgetsPagesNotFoundTemplate: '404/URL = {path}/From = {referrer}'
matomoWidgetsTitle: ''
matomoWidgetsTokenAuth: ''
matomoWidgetsUrl: ''
pids:
news:
storage: '1062'
detail: '1063'
events:
storage: '1064'
detail: '1065'
intranet:
storage: '1082'
root: '1081'
mail:
storage: '3909'
rootPageId: 1061
routeEnhancers:
Login:
limitToPages:
- 1061
Cookie:
limitToPages:
- 1061
EventNewsPlugin:
limitToPages:
- '1065'
NewsPlugin:
limitToPages:
- '1063'
solr_path_read: null
websiteTitle: '3S Kursus 2'
imports:
-
resource: 'EXT:mspconfig/Configuration/Site/Default.yaml'
wanted config.yaml:
base: 'https://live-domain.dk'
baseVariants:
-
base: '%env(DKM_INSTANCE_HOST)%/3skursus/'
condition: 'applicationContext != "Production/Live"'
rootPageId: 1061
pids:
news:
storage: '1062'
detail: '1063'
events:
storage: '1064'
detail: '1065'
intranet:
storage: '1082'
root: '1081'
mail:
storage: '3909'
websiteTitle: '3S Kursus'
imports:
-
resource: 'EXT:mspconfig/Configuration/Site/Default.yaml'Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
Fix this issue
Start the commit message of your patch with this. Add what the patch does, and the versions it goes to in "Releases:". How to create a patch
- Commit message
-
[BUGFIX] Saving changes in Site Configuration breaks config Resolves: #107997 Releases: main
History 6
-
Garvin Hicking commented and changed category status
NewNeeds Feedback <span data-processor="relativetime" data-value="2026-04-14T19:03:16+00:00" > 04/14/26, 19:03 </span> -
Anton Danilov commented <span data-processor="relativetime" data-value="2026-04-14T19:56:11+00:00" > 04/14/26, 19:56 </span>
Garvin Hicking wrote in #note-1:
> A few changes have been made here, can you check if this still happens?Which changes do you mean? I don’t see that something was changed in the source code. As far as I know the problem is related with #101614 and reverting
$processed = $this->yamlFileLoader->load(GeneralUtility::fixWindowsFilePath($fileName), YamlFileLoader::PROCESS_IMPORTS);back to
$processed = $this->yamlFileLoader->load(GeneralUtility::fixWindowsFilePath($fileName));in https://github.com/TYPO3/typo3/blob/13.4/typo3/sysext/core/Classes/Configuration/SiteWriter.php#L121 (https://github.com/TYPO3/typo3/blob/12.4/typo3/sysext/core/Classes/Configuration/SiteConfiguration.php#L325 in TYPO3 v12) does solve this issue, but will break the functionality that #101614 intended to fix. Unfortunately, I have no idea how to fix it permanently.
-
Garvin Hicking commented <span data-processor="relativetime" data-value="2026-04-14T20:08:58+00:00" > 04/14/26, 20:08 </span>
I was more referring to v13 / v14 where some changes were made to the handling. I wasn’t specific enough, sorry. At least in my v13 instances I can work with ENV placeholders and saving them in the Site Configuration GUI keeps the ENV placeholders in … place ;)
-
Anton Danilov commented <span data-processor="relativetime" data-value="2026-04-14T20:38:29+00:00" > 04/14/26, 20:38 </span>
In v14, yes — Feature #109263 probably solves the problem described in the task description (at first glance). A developer can replace placeholders like %%pids.events.detail%% with expression language using the
siteobject, but that is only available in v14.The actual problem in v12/v13 is that options with placeholders that come from imported YAML files (via the
imports:directive) get written directly into the siteconfig.yamlwhen saving. This leads to the corruption shown in the original report. -
Garvin Hicking commented and changed assigned to Garvin Hicking TYPO3 Version
1213 <span data-processor="relativetime" data-value="2026-04-15T06:34:40+00:00" > 04/15/26, 06:34 </span>Oooh thanks Anton, NOW I actually see what this is about. I never worked with ENV variables inside imports, only in the main file.
I guess we would need to adapt the logic so that we need to properly evaluate all the keys that are in the main config.yaml and never store keys in there that are shipped in an import. Since we can parse the file without imports, we should be able to build a “diff” from that scenario.
I’ll try to work on that after LTS release. (If anyone wants to get in touch on this, please do)
-
Stig Nørgaard Færch commented <span data-processor="relativetime" data-value="2026-04-15T08:25:24+00:00" > 04/15/26, 08:25 </span>
Garvin Hicking wrote in #note-5:
> I’ll try to work on that after LTS release. (If anyone wants to get in touch on this, please do)Sounds great. Would love to test any patches.
A few changes have been made here, can you check if this still happens?