octobercms/october · error · ApplicationException
No definition for scope
Error message
No definition for scope [{}] found What it means
Generic lookup guard in getScope: it indexes the allScopes array by name and throws whenever the requested key is absent. All callers (applyScopeToQuery, getScopeValue, putScopeValue, onFilterUpdate) funnel through here, so this error ultimately means a scope name was used (in config, a request, or code) that the filter widget never defined.
Solutions
- Define the scope in the filter configuration under the exact name being requested
- Correct the scope name at the call site (check for typos and case mismatch)
- Ensure the scope definition is loaded before getScope is called
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at modules/backend/widgets/Filter.php:573 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/f9bc340951750c85.
Report an issue: GitHub.
Appendix: source
Thrown at modules/backend/widgets/Filter.php:573
/**
* getScopes gets all the registered scopes for the instance.
* @return array
*/
public function getScopes()
{
return $this->allScopes;
}
/**
* getScope gets a specified scope object
* @param string $scope
* @return mixed
*/
public function getScope($scope)
{
if (!isset($this->allScopes[$scope])) {
throw new ApplicationException("No definition for scope [{$scope}] found");
}
return $this->allScopes[$scope];
}
/**
* getDependScopes
*/
protected function getDependScopes($parentScope): array
{
$dependScopes = [];
foreach ($this->getScopes() as $scope) {
if ($scope->scopeName === $parentScope->scopeName) {
continue;
}
if (!$scope->dependsOn) {
continue;View on GitHub (pinned to b608633a7e)