octobercms/october · error · ApplicationException
Error deleting file :name.
Error message
Error deleting file :name.
What it means
Error "Error deleting file :name." thrown in octobercms/october.
Source
Thrown at modules/cms/classes/Asset.php:377
*/
public function delete()
{
$fileName = Request::input('fileName');
$fullPath = $this->getFilePath($fileName);
$this->validateFileName($fileName);
if (!FileHelper::validateInTheme($this->theme, $fullPath)) {
throw new ValidationException(['fileName' =>
Lang::get('cms::lang.cms_object.invalid_file', [
'name' => $fileName
])
]);
}
if (File::exists($fullPath)) {
if (!@File::delete($fullPath)) {
throw new ApplicationException(Lang::get(
'cms::lang.asset.error_deleting_file',
['name' => $fileName]
));
}
}
}
/**
* validateFileName supplied with extension and path.
* @param string $fileName
*/
protected function validateFileName($fileName = null)
{
if ($fileName === null) {
$fileName = $this->fileName;
}
$fileName = trim($fileName);View on GitHub (pinned to b608633a7e)
When it happens
Trigger: Thrown at modules/cms/classes/Asset.php:377 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/c58a755d7e52bbf2.
Report an issue: GitHub.