{"record":{"id":"f9bc340951750c85","repo":"octobercms/october","slug":"no-definition-for-scope-found","errorCode":null,"errorMessage":"No definition for scope [{}] found","messagePattern":"No definition for scope \\[(.+?)\\] found","errorType":"exception","errorClass":"ApplicationException","httpStatus":null,"severity":"error","filePath":"modules/backend/widgets/Filter.php","lineNumber":573,"sourceCode":"\n    /**\n     * getScopes gets all the registered scopes for the instance.\n     * @return array\n     */\n    public function getScopes()\n    {\n        return $this->allScopes;\n    }\n\n    /**\n     * getScope gets a specified scope object\n     * @param  string $scope\n     * @return mixed\n     */\n    public function getScope($scope)\n    {\n        if (!isset($this->allScopes[$scope])) {\n            throw new ApplicationException(\"No definition for scope [{$scope}] found\");\n        }\n\n        return $this->allScopes[$scope];\n    }\n\n    /**\n     * getDependScopes\n     */\n    protected function getDependScopes($parentScope): array\n    {\n        $dependScopes = [];\n        foreach ($this->getScopes() as $scope) {\n            if ($scope->scopeName === $parentScope->scopeName) {\n                continue;\n            }\n\n            if (!$scope->dependsOn) {\n                continue;","sourceCodeStart":555,"sourceCodeEnd":591,"githubUrl":"https://github.com/octobercms/october/blob/b608633a7e8922487d91a8161499020121c3b3bf/modules/backend/widgets/Filter.php#L555-L591","documentation":"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.","triggerScenarios":"Thrown at modules/backend/widgets/Filter.php:573 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","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"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b608633a7e8922487d91a8161499020121c3b3bf","analyzedAt":"2026-08-21T04:24:57.515Z","contentChangedAt":"2026-08-21T04:24:57.515Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}