{"record":{"id":"b478cabd95e2d0d3","repo":"octobercms/october","slug":"form-behavior-does-not-contain-a-field-for-field","errorCode":null,"errorMessage":"Form behavior does not contain a field for ':field'.","messagePattern":"Form behavior does not contain a field for ':field'\\.","errorType":"exception","errorClass":"SystemException","httpStatus":null,"severity":"error","filePath":"modules/backend/widgets/Filter.php","lineNumber":436,"sourceCode":"            $sqlCondition = str_replace([\"':value'\", \"':filtered'\", ':filtered'], ':value', $sqlCondition);\n\n            $query->whereRaw(DbDongle::parse($sqlCondition, [\n                'value' => $scopeValue\n            ]));\n            return;\n        }\n\n        $query->where($scope->valueFrom ?: $scope->scopeName, $scopeValue);\n    }\n\n    /**\n     * renderScopeElement for a scope\n     */\n    public function renderScopeElement($scope)\n    {\n        if (is_string($scope)) {\n            if (!isset($this->allScopes[$scope])) {\n                throw new SystemException(Lang::get(\n                    'backend::lang.form.missing_definition',\n                    compact('scope')\n                ));\n            }\n\n            $scope = $this->allScopes[$scope];\n        }\n\n        return $this->makePartial('scope_' . $scope->type, [\n            'scope' => $scope,\n        ]);\n    }\n\n    /**\n     * renderScopeFormElement\n     */\n    public function renderScopeFormElement($scope)\n    {","sourceCodeStart":418,"sourceCodeEnd":454,"githubUrl":"https://github.com/octobercms/october/blob/b608633a7e8922487d91a8161499020121c3b3bf/modules/backend/widgets/Filter.php#L418-L454","documentation":"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).","triggerScenarios":"Thrown at modules/backend/widgets/Filter.php:436 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","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"],"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"}