octobercms/october · error · SystemException
Missing source for '{$this->fieldName}'.
Error message
Missing source for '{$this->fieldName}'. What it means
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.
Source
Thrown at modules/tailor/contentfields/EntriesField.php:350
? array_merge($fieldConfig[$transfer], (array) $this->controller[$transfer])
: $this->controller[$transfer];
}
}
$field->controller($fieldConfig);
}
/**
* getSourceBlueprint validates and converts source to a blueprint
*/
protected function getSourceBlueprint()
{
if ($this->sourceCache !== null) {
return $this->sourceCache;
}
if (!$this->source) {
throw new SystemException("Missing source for '{$this->fieldName}'.");
}
$indexer = BlueprintIndexer::instance();
$uuid = $indexer->hasSection($this->source);
if (!$uuid) {
throw new SystemException("Invalid source '{$this->source}' for '{$this->fieldName}'.");
}
return $this->sourceCache = BlueprintIndexer::instance()->findSection($uuid);
}
/**
* getSourceFieldset returns the source fieldset definition for checking inverse relations
*/
protected function getSourceFieldset()
{
if ($this->fieldsetCache !== null) {View on GitHub (pinned to b608633a7e)
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.
Example fix
# before
fields:
related_posts:
label: Related Posts
type: entries
# after
fields:
related_posts:
label: Related Posts
type: entries
source: blog/posts Defensive patterns
Strategy: validation
Validate before calling
$fieldConfig = $blueprintContent['fields'][$fieldName] ?? [];
if (($fieldConfig['type'] ?? '') === 'entries' && empty($fieldConfig['source'])) {
throw new InvalidArgumentException("Field '{$fieldName}' of type entries requires a source.");
} Type guard
function hasRequiredSource(array $fieldConfig): bool
{
return !empty($fieldConfig['source']);
} Try / catch
try {
// tailor:refresh / record save
} catch (\SystemException $e) {
// message names the field; add source: <handle> to its YAML config
} Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- Invalid inverse field '{$this->inverse}' for source '{$this-
- Invalid source '{$this->source}' for '{$this->fieldName}'.
- Type must be one of: {$typeAsString}.
- Field name is reserved: {$fieldName}.
- Invalid source reference '{$source}'. No blueprint found wit
AI-assisted analysis of octobercms/october@b608633a7e (2026-08-21).
Data as JSON: /api/errors/8f0040294e2e2595.
Report an issue: GitHub.