octobercms/october · error · SystemException
[{$importFile}] {message}
Error message
[{$importFile}] {message} What it means
ThemeSeed::importSeedData() runs the instructions in the theme's seeds/data.yaml and wraps any exception thrown during processing in a SystemException whose message is prefixed with the absolute YAML path. The prefix is context, not cause: the real failure (bad instruction, missing import file, model error) is the wrapped exception, available via getPrevious().
Source
Thrown at modules/cms/models/ThemeSeed.php:149
BlueprintIndexer::instance()->setNotesOutput($this->getNotesOutput())->migrate();
}
/**
* importSeedData
*/
protected function importSeedData()
{
// Importing seed data
$importFile = $this->themePath . '/seeds/data.yaml';
if (File::isFile($importFile)) {
$this->note('Importing Data');
$instructions = Yaml::parseFile($importFile);
try {
$this->processSeedInstructions($instructions);
}
catch (Exception $ex) {
throw new SystemException("[{$importFile}] " . $ex->getMessage(), 0, $ex);
}
}
}
/**
* importSeedLang
*/
protected function importSeedLang()
{
// Import language files
$themeLangPath = $this->themePath . '/seeds/lang';
$appLangPath = app_path('lang');
if (File::isDirectory($themeLangPath)) {
$this->note('Importing Translations');
if (!File::exists($appLangPath)) {
File::makeDirectory($appLangPath);
}View on GitHub (pinned to b608633a7e)
Solutions
- Read the message after the path and inspect $e->getPrevious() - it names the actual failing instruction and reason.
- Open the referenced seeds/data.yaml and fix the specific instruction flagged by the inner message (typically missing class/file/attributes, a non-loadable class, or a wrong file path).
- Re-run php artisan theme:seed <theme> after the fix; seed steps are idempotent for most importers via matches/attributes.
- If the inner error is a model import failure, correct the data file the instruction points at, not data.yaml itself.
Example fix
# before: only the wrapper is shown
# [themes/demo/seeds/data.yaml] Import file 'content/about.htm' does not exist.
// after: log the real cause when catching
catch (\October\Rain\Exception\SystemException $e) {
$root = $e->getPrevious() ?: $e;
\Log::error($root->getMessage());
}
# then fix the matching entry inside themes/demo/seeds/data.yaml Defensive patterns
Strategy: try-catch
Try / catch
try {
\Artisan::call('theme:seed', ['name' => $themeDir]);
} catch (\October\Rain\Exception\SystemException $e) {
$root = $e->getPrevious() ?: $e;
\Log::error('Seed failed: ' . $root->getMessage());
// the '[path] ' prefix tells you WHICH yaml; the previous exception tells you WHY
} Prevention
- Run php artisan theme:seed on a staging copy before shipping theme seed data.
- Keep seeds/data.yaml instructions minimal and test each class/file pair.
- Treat the bracketed path as a pointer to the file to inspect, never as the error cause.
When it happens
Trigger: Running php artisan theme:seed (or theme activation seeding) on a theme whose seeds/data.yaml exists, where any processSeedInstruction() step throws - the catch rethrows as '[path/to/theme/seeds/data.yaml] original message'. Any of the instruction-level failures (missing keys, unknown class, missing file) or model import errors surface this way.
Common situations: Theme authors shipping seed data for the first time; seeding on an environment where a plugin required by an instruction is absent; YAML edits that dropped a required key; the underlying importer hitting validation errors on provided data.
Related errors
- Import script is missing definition for 'class'
- Import script is missing definition for 'file'
- Import script is missing definition for 'attributes'
- Import class '{$className}' does not exist.
- Import file '{$fileName}' does not exist.
AI-assisted analysis of octobercms/october@b608633a7e (2026-08-21).
Data as JSON: /api/errors/83ba3c55227485ea.
Report an issue: GitHub.