{"record":{"id":"1a8d555152ad3521","repo":"OrchardCMS/OrchardCore","slug":"unsupported-setting-settingname","errorCode":null,"errorMessage":"Unsupported setting '{settingName}'","messagePattern":"Unsupported setting '(.+?)'","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"src/OrchardCore.Modules/OrchardCore.Settings/Deployment/SiteSettingsDeploymentSource.cs","lineNumber":99,"sourceCode":"\n                case \"CdnBaseUrl\":\n                    data.Add(nameof(ISite.CdnBaseUrl), site.CdnBaseUrl);\n                    break;\n\n                case \"AppendVersion\":\n                    data.Add(nameof(ISite.AppendVersion), site.AppendVersion);\n                    break;\n\n                case \"HomeRoute\":\n                    data.Add(nameof(ISite.HomeRoute), JObject.FromObject(site.HomeRoute));\n                    break;\n\n                case \"CacheMode\":\n                    data.Add(nameof(ISite.CacheMode), JsonValue.Create(site.CacheMode));\n                    break;\n\n                default:\n                    throw new InvalidOperationException($\"Unsupported setting '{settingName}'\");\n            }\n        }\n\n        result.Steps.Add(data);\n    }\n}\n","sourceCodeStart":81,"sourceCodeEnd":106,"githubUrl":"https://github.com/OrchardCMS/OrchardCore/blob/4306c0717fe573f6fca1b4955909ddab6a192807/src/OrchardCore.Modules/OrchardCore.Settings/Deployment/SiteSettingsDeploymentSource.cs#L81-L106","documentation":"SiteSettingsDeploymentSource.ProcessAsync has an exhaustive switch over known site setting names when building a site-settings deployment plan; an unrecognized setting name hits the default case and throws InvalidOperationException. This guards the export step list against unknown or renamed setting keys.","triggerScenarios":"Running a site settings deployment plan whose Settings list contains a setting name not handled by the switch — e.g. after a module upgrade added a new ISite property or a hand-edited/legacy deployment plan JSON.","commonSituations":"Version drift: plan file created in a newer/older Orchard Core version; custom ISite extensions exporting settings the stock source doesn't know.","solutions":["Update Orchard Core so the setting name is supported by the deployment source","Remove the unknown setting name from the deployment plan's Settings list","If a custom setting, implement a custom deployment source instead of extending the stock list"],"exampleFix":"// before\n\"Settings\": [\"BaseUrl\", \"MyCustomSetting\"]\n// after\n\"Settings\": [\"BaseUrl\"] // remove unsupported entries","handlingStrategy":"validation","validationCode":"var supported = new HashSet<string>{\"CacheMode\", /* ...all switch cases */}; var bad = plan.Settings.Where(s => !supported.Contains(s)).ToList(); if (bad.Any()) throw new InvalidOperationException($\"Unsupported settings: {string.Join(',', bad)}\");","typeGuard":null,"tryCatchPattern":"try { await source.ProcessAsync(...); } catch (InvalidOperationException e) when (e.Message.StartsWith(\"Unsupported setting\")) { logger.LogError(e, \"Deployment plan contains unsupported setting\"); }","preventionTips":["Regenerate deployment plans after Orchard Core upgrades","Keep plan Settings in sync with the module version","Prefer UI-generated plans over hand-edited JSON"],"tags":["csharp","orchardcore-settings","deployment","unsupported-value"],"backgroundTag":"unsupported-config-value","analyzedSha":"4306c0717fe573f6fca1b4955909ddab6a192807","analyzedAt":"2026-09-13T17:41:05.024Z","contentChangedAt":"2026-09-13T17:41:05.024Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}