{"record":{"id":"e09ac0a7020ee400","repo":"octobercms/october","slug":"the-attribute-field-does-not-resolve-to-a-valid","errorCode":null,"errorMessage":"The attribute ':field' does not resolve to a valid model. Try specifying the options method for model class :model explicitly.","messagePattern":"The attribute ':field' does not resolve to a valid model\\. Try specifying the options method for model class :model explicitly\\.","errorType":"exception","errorClass":"SystemException","httpStatus":null,"severity":"error","filePath":"modules/backend/classes/FormField.php","lineNumber":567,"sourceCode":"                ]));\n            }\n\n            $fieldOptions = $model->$methodName($this->value, $this->fieldName, $data);\n        }\n\n        return $fieldOptions;\n    }\n\n    /**\n     * getOptionsFromModelAsDefault refers to the model method or any of its behaviors\n     */\n    protected function getOptionsFromModelAsDefault($model, $data)\n    {\n        try {\n            [$model, $attribute] = $this->resolveModelAttributeInternal($model, $this->fieldName, ['objectOnly' => true]);\n        }\n        catch (Exception $ex) {\n            throw new SystemException(Lang::get('backend::lang.field.options_method_invalid_model', [\n                'model' => get_class($model),\n                'field' => $this->fieldName\n            ]));\n        }\n\n        $methodName = 'get'.studly_case($attribute).'Options';\n        if (\n            !$this->objectMethodExists($model, $methodName) &&\n            !$this->objectMethodExists($model, 'getDropdownOptions')\n        ) {\n            throw new SystemException(Lang::get('backend::lang.field.options_method_not_exists', [\n                'model' => get_class($model),\n                'method' => $methodName,\n                'field' => $this->fieldName\n            ]));\n        }\n\n        if ($this->objectMethodExists($model, $methodName)) {","sourceCodeStart":549,"sourceCodeEnd":585,"githubUrl":"https://github.com/octobercms/october/blob/b608633a7e8922487d91a8161499020121c3b3bf/modules/backend/classes/FormField.php#L549-L585","documentation":"Error \"The attribute ':field' does not resolve to a valid model. Try specifying the options method for model class :model explicitly.\" thrown in octobercms/october.","triggerScenarios":"Thrown at modules/backend/classes/FormField.php:567 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b608633a7e8922487d91a8161499020121c3b3bf","analyzedAt":"2026-08-21T04:24:57.515Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}