{"record":{"id":"8f0040294e2e2595","repo":"octobercms/october","slug":"missing-source-for-this-fieldname","errorCode":null,"errorMessage":"Missing source for '{$this->fieldName}'.","messagePattern":"Missing source for '(.+?)'\\.","errorType":"exception","errorClass":"SystemException","httpStatus":null,"severity":"error","filePath":"modules/tailor/contentfields/EntriesField.php","lineNumber":350,"sourceCode":"                    ? array_merge($fieldConfig[$transfer], (array) $this->controller[$transfer])\n                    : $this->controller[$transfer];\n            }\n        }\n\n        $field->controller($fieldConfig);\n    }\n\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) {","sourceCodeStart":332,"sourceCodeEnd":368,"githubUrl":"https://github.com/octobercms/october/blob/b608633a7e8922487d91a8161499020121c3b3bf/modules/tailor/contentfields/EntriesField.php#L332-L368","documentation":"getSourceBlueprint() lazily resolves an entries field's `source` to a section blueprint via the BlueprintIndexer; the first guard rejects a falsy source with SystemException(\"Missing source for '{field}'.\"). Entries fields store relations to other blueprints, so without a source there is nothing to relate to.","triggerScenarios":"A field with `type: entries` (or `type: entry`) is defined without a `source:` key in the blueprint or imported fieldset. The exception fires whenever Tailor extends models or builds the schema for a record using that fieldset.","commonSituations":"Field config copied from a recordfinder or incomplete example; YAML indentation placing `source` under another key so it parses as null; shared fieldsets where source is expected per-blueprint but omitted.","solutions":["Add `source: <blueprint-handle-or-uuid>` directly under the entries field config.","Check YAML indentation — `source` must be a direct child key of the field.","If the field shouldn't be relational, switch the type to text or another non-relational field."],"exampleFix":"# before\nfields:\n  related_posts:\n    label: Related Posts\n    type: entries\n\n# after\nfields:\n  related_posts:\n    label: Related Posts\n    type: entries\n    source: blog/posts","handlingStrategy":"validation","validationCode":"$fieldConfig = $blueprintContent['fields'][$fieldName] ?? [];\nif (($fieldConfig['type'] ?? '') === 'entries' && empty($fieldConfig['source'])) {\n    throw new InvalidArgumentException(\"Field '{$fieldName}' of type entries requires a source.\");\n}","typeGuard":"function hasRequiredSource(array $fieldConfig): bool\n{\n    return !empty($fieldConfig['source']);\n}","tryCatchPattern":"try {\n    // tailor:refresh / record save\n} catch (\\SystemException $e) {\n    // message names the field; add source: <handle> to its YAML config\n}","preventionTips":["When authoring entries fields, always include source (and check indentation) in the same edit.","Use a fieldset template/snippet that includes source for relational fields."],"tags":["tailor","entries-field","source","blueprint"],"backgroundTag":"missing-required-config","analyzedSha":"b608633a7e8922487d91a8161499020121c3b3bf","analyzedAt":"2026-08-21T04:24:57.515Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}