octobercms/october · error · SystemException
Invalid source '{$this->source}' for '{$this->fieldName}'.
Error message
Invalid source '{$this->source}' for '{$this->fieldName}'. What it means
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.
Source
Thrown at modules/tailor/contentfields/EntriesField.php:357
/**
* 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) {
return $this->fieldsetCache;
}
return $this->fieldsetCache = BlueprintIndexer::instance()->findContentFieldset($this->getSourceBlueprint()->uuid);
}
}
View on GitHub (pinned to b608633a7e)
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).
Example fix
# before
fields:
posts:
type: entries
source: blog/post
# after (matching existing blueprint handle)
fields:
posts:
type: entries
source: blog/posts Defensive patterns
Strategy: validation
Validate before calling
if (!\Tailor\Classes\BlueprintIndexer::instance()->hasSection($source)) {
throw new InvalidArgumentException("Source '{$source}' not found in blueprint index — run tailor:refresh or create the blueprint.");
} Type guard
function isIndexedSource(string $source): bool
{
return (bool) \Tailor\Classes\BlueprintIndexer::instance()->hasSection($source);
} Try / catch
try {
// record operations using the entries field
} catch (\SystemException $e) {
// source unresolvable: verify blueprint exists, run php artisan tailor:refresh, retry
} Prevention
- 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.
When it happens
Trigger: `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.
Common situations: 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.
Related errors
- Missing source for '{$this->fieldName}'.
- Invalid inverse field '{$this->inverse}' for source '{$this-
- Type must be one of: {$typeAsString}.
- Invalid field name: {$fieldName}.
- Field name is reserved: {$fieldName}.
AI-assisted analysis of octobercms/october@b608633a7e (2026-08-21).
Data as JSON: /api/errors/c217241d412786b3.
Report an issue: GitHub.