octobercms/october · error · SystemException
Form behavior does not contain a field for ':field'.
Error message
Form behavior does not contain a field for ':field'.
What it means
Fires in renderScopeElement when it is called with a scope name (string) that has no matching entry in the filter widget's allScopes registry. The scopes registry is built from the filter's YAML/config definitions, so this means the requested scope was never defined there (typo, or referenced before definitions were loaded).
Solutions
- Add the missing scope to the filter widget's scopes configuration (config_filter.yaml)
- Fix the scope name passed to renderScopeElement so it matches a defined scope key exactly
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at modules/backend/widgets/Filter.php:436 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of octobercms/october@b608633a7e (2026-08-21).
Data as JSON: /api/errors/b478cabd95e2d0d3.
Report an issue: GitHub.
Appendix: source
Thrown at modules/backend/widgets/Filter.php:436
$sqlCondition = str_replace(["':value'", "':filtered'", ':filtered'], ':value', $sqlCondition);
$query->whereRaw(DbDongle::parse($sqlCondition, [
'value' => $scopeValue
]));
return;
}
$query->where($scope->valueFrom ?: $scope->scopeName, $scopeValue);
}
/**
* renderScopeElement for a scope
*/
public function renderScopeElement($scope)
{
if (is_string($scope)) {
if (!isset($this->allScopes[$scope])) {
throw new SystemException(Lang::get(
'backend::lang.form.missing_definition',
compact('scope')
));
}
$scope = $this->allScopes[$scope];
}
return $this->makePartial('scope_' . $scope->type, [
'scope' => $scope,
]);
}
/**
* renderScopeFormElement
*/
public function renderScopeFormElement($scope)
{View on GitHub (pinned to b608633a7e)