octobercms/october · error · SystemException
Cannot create file: :name
Error message
Cannot create file: :name
What it means
Error "Cannot create file: :name" thrown in octobercms/october.
Source
Thrown at modules/cms/classes/CodeParser.php:186
$className = $data['className'];
if (!class_exists($className)) {
require_once $data['filePath'];
}
// Handle corrupt cache during concurrent access
$count = 0;
while (!class_exists($className)) {
if ($count !== 0) {
usleep(rand(50000, 200000));
}
$data = $this->handleCorruptCache($data);
$className = $data['className'];
if ($count++ > 10) {
$path = $data['filePath'] ?? $this->getCacheFilePath();
throw new SystemException(Lang::get('system::lang.file.create_fail', ['name'=>$path]));
}
}
return new $className($page, $layout, $controller);
}
/**
* handleCorruptCache in some rare cases the cache file will not contain the class
* name we expect. When this happens, destroy the corrupt file,
* flush the request cache, and repeat the cycle.
* @return void
*/
protected function handleCorruptCache($data)
{
$path = $data['filePath'] ?? $this->getCacheFilePath();
if (is_file($path)) {
if (($className = $this->extractClassFromFile($path)) && class_exists($className)) {View on GitHub (pinned to b608633a7e)
When it happens
Trigger: Thrown at modules/cms/classes/CodeParser.php:186 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/10a396249640833d.
Report an issue: GitHub.