{"record":{"id":"4e4a0237a15e4035","repo":"nextcloud/all-in-one","slug":"the-dictionaries-must-not-be-empty","errorCode":null,"errorMessage":"The dictionaries must not be empty!","messagePattern":"The dictionaries must not be empty!","errorType":"validation","errorClass":"InvalidSettingConfigurationException","httpStatus":422,"severity":"warning","filePath":"php/src/Data/ConfigurationManager.php","lineNumber":1065,"sourceCode":"            return trim($network);\n        }\n        return '';\n    }\n\n    public function getNextcloudStartupApps() : string {\n        $apps = getenv('NEXTCLOUD_STARTUP_APPS');\n        if (is_string($apps)) {\n            return trim($apps);\n        }\n        return 'deck twofactor_totp tasks calendar contacts notes';\n    }\n\n    /**\n     * @throws InvalidSettingConfigurationException\n     */\n    private function validateCollaboraDictionaries(string $CollaboraDictionaries) : void {\n        if ($CollaboraDictionaries === \"\") {\n            throw new InvalidSettingConfigurationException(\"The dictionaries must not be empty!\");\n        }\n\n        if (!preg_match(\"#^[a-zA-Z_ ]+$#\", $CollaboraDictionaries)) {\n            throw new InvalidSettingConfigurationException(\"The entered dictionaries do not seem to be a valid!\");\n        }\n    }\n\n    /**\n     * Provide an extra method since the corresponding attribute setter prevents setting an empty value.\n     */\n    public function deleteCollaboraDictionaries() : void {\n        $this->set('collabora_dictionaries', '');\n    }\n\n    /**\n     * @throws InvalidSettingConfigurationException\n     */\n    private function validateCollaboraAdditionalOptions(string $additionalCollaboraOptions) : void {","sourceCodeStart":1047,"sourceCodeEnd":1083,"githubUrl":"https://github.com/nextcloud/all-in-one/blob/6b788eec5e61733cf03ed380a3572e43ae3f11ce/php/src/Data/ConfigurationManager.php#L1047-L1083","documentation":"Thrown by validateCollaboraDictionaries when the collabora_dictionaries value is empty. The setter stores a space-separated language list that is passed to the Collabora (CODE) container; empty is refused and removal goes through the dedicated deleteCollaboraDictionaries() path (delete_collabora_dictionaries form key).","triggerScenarios":"POSTing the options form with a 'collabora_dictionaries' key whose value is '' or only whitespace is not enough here (no trim before the check, so a whitespace-only string actually passes the empty check and fails the charset regex instead).","commonSituations":"Automation sending all option keys with defaults; UI select submitting an empty option after an upstream template change.","solutions":["Send a non-empty space-separated list of dictionary codes, e.g. 'de_DE en_GB es_ES'.","To clear the setting, use the delete_collabora_dictionaries action rather than an empty value.","Omit the key when the dictionaries should remain unchanged."],"exampleFix":"// before\ncurl -d 'collabora_dictionaries=' https://host/api/webconfig\n\n// after\ncurl -d 'collabora_dictionaries=de_DE en_GB' https://host/api/webconfig","handlingStrategy":"validation","validationCode":"if (trim($collaboraDictionaries) === '') {\n    // use the delete action or block the request\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Default the picker to 'en_US' style values instead of empty.","Use the delete_collabora_dictionaries key to clear."],"tags":["php","nextcloud-aio","input-validation","collabora","configuration"],"backgroundTag":"required-field-empty","analyzedSha":"6b788eec5e61733cf03ed380a3572e43ae3f11ce","analyzedAt":"2026-08-21T05:47:24.382Z","schemaVersion":2},"datasetVersion":"2026-08-21T13:17:26.733Z"}