octobercms/october · error · SystemException
cms::lang.cms_object.invalid_file
Error message
cms::lang.cms_object.invalid_file
What it means
Error "cms::lang.cms_object.invalid_file" thrown in octobercms/october.
Source
Thrown at modules/cms/classes/ComponentPartial.php:199
{
$partial = new static($component);
if (!strlen(File::extension($fileName))) {
$fileName .= '.' . $partial->getDefaultExtension();
}
return File::isFile($partial->getFilePath($fileName));
}
/**
* validateFileName checks the supplied file name for validity.
* @param string $fileName
* @return string
*/
protected function validateFileName($fileName)
{
if (!FileHelper::validatePath($fileName, $this->maxNesting)) {
throw new SystemException(Lang::get('cms::lang.cms_object.invalid_file', [
'name' => $fileName
]));
}
if (!strlen(File::extension($fileName))) {
$fileName .= '.'.$this->defaultExtension;
}
return $fileName;
}
/**
* getContent returns the file content.
* @return string
*/
public function getContent()
{
return $this->content;View on GitHub (pinned to b608633a7e)
When it happens
Trigger: Thrown at modules/cms/classes/ComponentPartial.php:199 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/94fd3e26a13c17df.
Report an issue: GitHub.