octobercms/october · error · ApplicationException
File ':name' already exists.
Error message
File ':name' already exists.
What it means
Error "File ':name' already exists." thrown in octobercms/october.
Source
Thrown at modules/cms/classes/Asset.php:307
['name' => $key]
));
}
$this->$key = $value;
}
}
/**
* save the object to the disk
*/
public function save()
{
$this->validateFileName();
$fullPath = $this->getFilePath();
if (File::isFile($fullPath) && $this->originalFileName !== $this->fileName) {
throw new ApplicationException(Lang::get(
'cms::lang.cms_object.file_already_exists',
['name'=>$this->fileName]
));
}
$dirPath = $this->theme->getPath().'/'.$this->dirName;
if (!file_exists($dirPath) || !is_dir($dirPath)) {
if (!File::makeDirectory($dirPath, 0755, true, true)) {
throw new ApplicationException(Lang::get(
'cms::lang.cms_object.error_creating_directory',
['name'=>$dirPath]
));
}
}
if (($pos = strpos($this->fileName, '/')) !== false) {
$dirPath = dirname($fullPath);
View on GitHub (pinned to b608633a7e)
When it happens
Trigger: Thrown at modules/cms/classes/Asset.php:307 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of octobercms/october@b608633a7e (2026-08-21).
Data as JSON: /api/errors/d8df1100abdf2fc8.
Report an issue: GitHub.