{"record":{"id":"aa65b832ed3770e7","repo":"octobercms/october","slug":"cms-lang-cms-object-error-saving-aa65b8","errorCode":null,"errorMessage":"cms::lang.cms_object.error_saving","messagePattern":"cms::lang\\.cms_object\\.error_saving","errorType":"exception","errorClass":"October\\Rain\\Exception\\ApplicationException","httpStatus":null,"severity":"error","filePath":"modules/tailor/classes/Blueprint.php","lineNumber":493,"sourceCode":"            if (!is_dir($dirPath) && !File::makeDirectory($dirPath, 0755, true, true)) {\n                throw new ApplicationException(Lang::get(\n                    'cms::lang.cms_object.error_creating_directory',\n                    ['name'=>$dirPath]\n                ));\n            }\n        }\n\n        // Ensure blueprint has uuid\n        if (!$this->uuid) {\n            $this->uuid = Str::uuid()->toString();\n            $newContent = 'uuid: ' . $this->uuid . PHP_EOL;\n            $newContent .= $this->content;\n            $this->content = $newContent;\n        }\n\n        $newFullPath = $fullPath;\n        if (@File::put($fullPath, $this->content) === false) {\n            throw new ApplicationException(Lang::get(\n                'cms::lang.cms_object.error_saving',\n                ['name' => $fileName]\n            ));\n        }\n\n        if (strlen($this->originalFileName) && $this->originalFileName !== $fileName) {\n            $fullPath = $this->getFilePath($this->originalFileName);\n\n            if (File::isFile($fullPath)) {\n                @unlink($fullPath);\n            }\n        }\n\n        clearstatcache();\n\n        $this->mtime = @File::lastModified($newFullPath);\n        $this->originalFileName = $fileName;\n        $this->exists = true;","sourceCodeStart":475,"sourceCodeEnd":511,"githubUrl":"https://github.com/octobercms/october/blob/b608633a7e8922487d91a8161499020121c3b3bf/modules/tailor/classes/Blueprint.php#L475-L511","documentation":"Error \"cms::lang.cms_object.error_saving\" thrown in octobercms/october.","triggerScenarios":"Thrown at modules/tailor/classes/Blueprint.php:493 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b608633a7e8922487d91a8161499020121c3b3bf","analyzedAt":"2026-08-21T04:24:57.515Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}