{"record":{"id":"0c910368f75ee558","repo":"octobercms/october","slug":"could-not-spawn-from-path-spawnpath","errorCode":null,"errorMessage":"Could not spawn from path [{$spawnPath}]","messagePattern":"Could not spawn from path \\[(.+?)\\]","errorType":"exception","errorClass":"SystemException","httpStatus":null,"severity":"error","filePath":"modules/tailor/models/RepeaterItem.php","lineNumber":318,"sourceCode":"        if ($this->multisiteEnabled) {\n            foreach ($this->propagatable as $name) {\n                if ($this->getRelationType($name)) {\n                    $this->defineMultisiteRelation($name);\n                }\n            }\n        }\n    }\n\n    /**\n     * extendWithBlueprintSpawn attempts to load from a respawned model, then copies the fieldset\n     * definition across before extending the model.\n     */\n    public function extendWithBlueprintSpawn(string $spawnPath)\n    {\n        $model = $this->spawnFromPath($spawnPath);\n\n        if (!$model) {\n            throw new SystemException(\"Could not spawn from path [{$spawnPath}]\");\n        }\n\n        $this->setFieldsetDefinition($model->getTable(), $model->fieldsetConfig, $model->useFieldsetGroups);\n\n        if ($model->useFieldsetGroups) {\n            $this->content_group = $model->content_group;\n        }\n\n        $this->extendWithBlueprint();\n    }\n\n    /**\n     * setBlueprintFieldConfig\n     */\n    public function setBlueprintFieldConfig($parentModel, string $tableName, string $fieldName, array $fieldConfig, bool $useGroups)\n    {\n        $this->host_field = $fieldName;\n        $this->setRelation('host', $parentModel);","sourceCodeStart":300,"sourceCodeEnd":336,"githubUrl":"https://github.com/octobercms/october/blob/b608633a7e8922487d91a8161499020121c3b3bf/modules/tailor/models/RepeaterItem.php#L300-L336","documentation":"Thrown by RepeaterItem::extendWithBlueprintSpawn(string $spawnPath) when spawnFromPath() fails to reconstruct the model chain from the stored spawn path. The path format is ClassName@blueprintUuid[:group].field[:group]...; it returns null when the path lacks '@', the class does not exist, a path segment has an empty field name, or makeRelation() cannot resolve a relation. The caller then throws a SystemException naming the offending path.","triggerScenarios":"A repeater item row whose content_spawn_path column references a class that no longer exists (renamed/removed plugin or model), a malformed path string (missing '@', empty segment, bad dots/colons), or a path whose relation chain no longer matches the blueprint's field definitions after they were restructured.","commonSituations":"Uninstalling or renaming a plugin that owned the parent model while repeater item rows remain in the database; editing blueprints so a repeater field name changed, invalidating stored spawn paths for existing content; legacy data written by an older path format after an October CMS upgrade; manually imported rows with corrupted content_spawn_path values.","solutions":["Inspect the stored value: query the repeater items table (content_spawn_path column) for the failing rows and compare the class name and field segments against current code","If the parent class was renamed, update the stored spawn paths to the new fully qualified class name (or write a one-off migration)","If a repeater field was renamed in the blueprint, either restore the old field name or rewrite affected spawn path segments to the new field name","Delete orphaned repeater item rows whose parent records no longer exist, then rebuild content"],"exampleFix":"// before: rows still reference the old plugin namespace\n// content_spawn_path = \"OldVendor\\Blog\\Models\\Post@8f2c...:slides.slide\"\n\n// after: one-off migration updates the class prefix\nuse Winter\\Storm\\Database\\Updater;\nDB::table('tailor_repeater_items')\n    ->where('content_spawn_path', 'like', 'OldVendor\\\\Blog\\\\%')\n    ->update([\n        'content_spawn_path' => DB::raw(\"REPLACE(content_spawn_path, 'OldVendor\\\\\\\\Blog\\\\\\\\', 'RainLab\\\\\\\\Blog\\\\\\\\')\")\n    ]);","handlingStrategy":"try-catch","validationCode":"// Validate a spawn path before extending\nfunction spawnPathResolvable(string $path): bool\n{\n    if (strpos($path, '@') === false) {\n        return false;\n    }\n    [$class] = explode('@', $path, 2);\n    return class_exists($class);\n}","typeGuard":null,"tryCatchPattern":"try {\n    $item->extendWithBlueprintSpawn($spawnPath);\n} catch (\\SystemException $e) {\n    \\Log::warning('Skipping repeater item with bad spawn path', ['path' => $spawnPath]);\n    // skip/render fallback markup rather than failing the whole page\n}","preventionTips":["Never rename repeater field names or owning model classes without a data migration for content_spawn_path","Back up repeater item tables before restructuring blueprints","When renaming a plugin namespace, include a migration that rewrites the class prefix in content_spawn_path"],"tags":["tailor","octobercms","repeater","spawn-path","data-corruption","blueprint"],"backgroundTag":"stale-stored-reference","analyzedSha":"b608633a7e8922487d91a8161499020121c3b3bf","analyzedAt":"2026-08-21T04:24:57.515Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}