{"record":{"id":"1b4277c38f00b4ab","repo":"octobercms/october","slug":"cms-lang-editor-error-no-doctype-permissions","errorCode":null,"errorMessage":"cms::lang.editor.error_no_doctype_permissions","messagePattern":"cms::lang\\.editor\\.error_no_doctype_permissions","errorType":"exception","errorClass":"ApplicationException","httpStatus":null,"severity":"error","filePath":"modules/cms/classes/editorextension/HasExtensionCrud.php","lineNumber":776,"sourceCode":"            return '/assets';\n        }\n\n        if ($template instanceof CmsLang) {\n            return '/lang';\n        }\n\n        return $template->getObjectTypeDirName();\n    }\n\n    /**\n     * assertDocumentTypePermissions\n     */\n    private function assertDocumentTypePermissions($documentType)\n    {\n        $user = BackendAuth::getUser();\n\n        if (!EditorExtension::hasAccessToDocType($user, $documentType)) {\n            throw new ApplicationException(Lang::get(\n                'cms::lang.editor.error_no_doctype_permissions',\n                ['doctype' => $documentType]\n            ));\n        }\n    }\n\n    /**\n     * mergeLangContentWithDefaultKeys merges the default locale's keys into the\n     * lang file content so translators see all available keys prepopulated.\n     */\n    /**\n     * command_onGetLangDefaultKeys returns the default language keys for\n     * prepopulating a new or existing lang file.\n     */\n    protected function command_onGetLangDefaultKeys()\n    {\n        $metadata = $this->getRequestMetadata();\n        $this->validateRequestTheme($metadata);","sourceCodeStart":758,"sourceCodeEnd":794,"githubUrl":"https://github.com/octobercms/october/blob/b608633a7e8922487d91a8161499020121c3b3bf/modules/cms/classes/editorextension/HasExtensionCrud.php#L758-L794","documentation":"Permission check in assertDocumentTypePermissions: the authenticated backend user lacks editor permissions for the requested document type, so the CRUD command (save/load metadata) is refused with the doctype named in the error data.","triggerScenarios":"Thrown at modules/cms/classes/editorextension/HasExtensionCrud.php:776 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Grant the user/group permission for that document type in the backend permissions UI","Request access from an administrator","Ensure the document type key in the request matches a type the user can access"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b608633a7e8922487d91a8161499020121c3b3bf","analyzedAt":"2026-08-21T04:24:57.515Z","contentChangedAt":"2026-08-21T04:24:57.515Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}