{"record":{"id":"c217241d412786b3","repo":"octobercms/october","slug":"invalid-source-this-source-for-this-fiel","errorCode":null,"errorMessage":"Invalid source '{$this->source}' for '{$this->fieldName}'.","messagePattern":"Invalid source '(.+?)' for '(.+?)'\\.","errorType":"exception","errorClass":"SystemException","httpStatus":null,"severity":"error","filePath":"modules/tailor/contentfields/EntriesField.php","lineNumber":357,"sourceCode":"\n    /**\n     * getSourceBlueprint validates and converts source to a blueprint\n     */\n    protected function getSourceBlueprint()\n    {\n        if ($this->sourceCache !== null) {\n            return $this->sourceCache;\n        }\n\n        if (!$this->source) {\n            throw new SystemException(\"Missing source for '{$this->fieldName}'.\");\n        }\n\n        $indexer = BlueprintIndexer::instance();\n\n        $uuid = $indexer->hasSection($this->source);\n        if (!$uuid) {\n            throw new SystemException(\"Invalid source '{$this->source}' for '{$this->fieldName}'.\");\n        }\n\n        return $this->sourceCache = BlueprintIndexer::instance()->findSection($uuid);\n    }\n\n    /**\n     * getSourceFieldset returns the source fieldset definition for checking inverse relations\n     */\n    protected function getSourceFieldset()\n    {\n        if ($this->fieldsetCache !== null) {\n            return $this->fieldsetCache;\n        }\n\n        return $this->fieldsetCache = BlueprintIndexer::instance()->findContentFieldset($this->getSourceBlueprint()->uuid);\n    }\n}\n","sourceCodeStart":339,"sourceCodeEnd":375,"githubUrl":"https://github.com/octobercms/october/blob/b608633a7e8922487d91a8161499020121c3b3bf/modules/tailor/contentfields/EntriesField.php#L339-L375","documentation":"After confirming a source is set, getSourceBlueprint() asks BlueprintIndexer::hasSection($source) to resolve it to a section UUID; a falsey result means no known blueprint matches, and a SystemException naming the field is thrown. Unlike the compile-time verifier check, this happens at runtime against the indexer's registry.","triggerScenarios":"`source: blog/posts` where no section blueprint with that handle or UUID is indexed — the target blueprint was deleted or never created, the handle is typo'd, or the index is stale because the blueprint was added after the last registry rebuild.","commonSituations":"Creating a new target blueprint but never running `php artisan tailor:refresh`/cache clear; renaming source blueprints; deploying to an environment where the referenced blueprint file is missing from the theme.","solutions":["Verify a blueprint with that exact handle/UUID exists in an active theme (or as a plugin/content blueprint).","Rebuild the Tailor index: run `php artisan tailor:refresh` (or clear the application cache) and retry.","Fix typos so the source matches the blueprint handle exactly (path-style, case-sensitive)."],"exampleFix":"# before\nfields:\n  posts:\n    type: entries\n    source: blog/post\n\n# after (matching existing blueprint handle)\nfields:\n  posts:\n    type: entries\n    source: blog/posts","handlingStrategy":"validation","validationCode":"if (!\\Tailor\\Classes\\BlueprintIndexer::instance()->hasSection($source)) {\n    throw new InvalidArgumentException(\"Source '{$source}' not found in blueprint index — run tailor:refresh or create the blueprint.\");\n}","typeGuard":"function isIndexedSource(string $source): bool\n{\n    return (bool) \\Tailor\\Classes\\BlueprintIndexer::instance()->hasSection($source);\n}","tryCatchPattern":"try {\n    // record operations using the entries field\n} catch (\\SystemException $e) {\n    // source unresolvable: verify blueprint exists, run php artisan tailor:refresh, retry\n}","preventionTips":["Run `php artisan tailor:refresh` after adding or renaming blueprints, before using fields that reference them.","Include tailor:refresh in deploy scripts so indexes are always current.","Prefer blueprint handles over UUIDs in sources to make drift visible in review."],"tags":["tailor","entries-field","source","blueprint-index"],"backgroundTag":"unresolved-reference","analyzedSha":"b608633a7e8922487d91a8161499020121c3b3bf","analyzedAt":"2026-08-21T04:24:57.515Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}