octobercms/october · error · October\Rain\Exception\ValidationException

cms::lang.cms_object.invalid_file_extension

Error message

cms::lang.cms_object.invalid_file_extension

What it means

Error "cms::lang.cms_object.invalid_file_extension" thrown in octobercms/october.

Source

Thrown at modules/tailor/classes/Blueprint.php:564

    protected function validateFileName(?string $fileName = null): void
    {
        if ($fileName === null) {
            $fileName = $this->fileName;
        }

        $fileName = trim($fileName);

        if (!strlen($fileName)) {
            throw new ValidationException(['fileName' =>
                Lang::get('cms::lang.cms_object.file_name_required', [
                    'allowed' => implode(', ', $this->allowedExtensions),
                    'invalid' => pathinfo($fileName, PATHINFO_EXTENSION)
                ])
            ]);
        }

        if (!FileHelper::validateExtension($fileName, $this->allowedExtensions, false)) {
            throw new ValidationException(['fileName' =>
                Lang::get('cms::lang.cms_object.invalid_file_extension', [
                    'allowed' => implode(', ', $this->allowedExtensions),
                    'invalid' => pathinfo($fileName, PATHINFO_EXTENSION)
                ])
            ]);
        }

        if (!FileHelper::validatePath($fileName, null)) {
            throw new ValidationException(['fileName' =>
                Lang::get('tailor::lang.blueprint.invalid_file', [
                    'name' => $fileName
                ])
            ]);
        }
    }

    /**
     * validate the blueprint

View on GitHub (pinned to b608633a7e)

When it happens

Trigger: Thrown at modules/tailor/classes/Blueprint.php:564 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/2efe5fa278fe2906. Report an issue: GitHub.