{"record":{"id":"ab61e28ecfff8cb9","repo":"octobercms/october","slug":"model-class-does-not-contain-a-method-method","errorCode":null,"errorMessage":"Model ':class' does not contain a method ':method'.","messagePattern":"Model ':class' does not contain a method ':method'\\.","errorType":"exception","errorClass":"ApplicationException","httpStatus":null,"severity":"error","filePath":"modules/backend/formwidgets/datatable/LegacyDataTable.php","lineNumber":113,"sourceCode":"        $config->alias = studly_case(HtmlHelper::nameToId($fieldName)) . 'datatable';\n        $config->fieldName = $fieldName;\n\n        $table = new Table($this->controller, $config);\n        $table->bindEvent('table.getDropdownOptions', [$this, 'getLegacyDataTableOptions']);\n        $table->bindEvent('table.getAutocompleteOptions', [$this, 'getLegacyDataTableOptions']);\n\n        return $table;\n    }\n\n    /**\n     * getLegacyDataTableOptions is the legacy dropdown/autocomplete option callback handler\n     */\n    public function getLegacyDataTableOptions($columnName, $rowData)\n    {\n        $methodName = 'get' . studly_case($this->fieldName) . 'DataTableOptions';\n\n        if (!$this->model->methodExists($methodName) && !$this->model->methodExists('getDataTableOptions')) {\n            throw new ApplicationException(\n                Lang::get(\n                    'backend::lang.model.missing_method',\n                    [\n                        'class' => get_class($this->model),\n                        'method' => 'getDataTableOptions'\n                    ]\n                )\n            );\n        }\n\n        if ($this->model->methodExists($methodName)) {\n            $result = $this->model->$methodName($columnName, $rowData);\n        }\n        else {\n            $result = $this->model->getDataTableOptions($this->fieldName, $columnName, $rowData);\n        }\n\n        if (!is_array($result)) {","sourceCodeStart":95,"sourceCodeEnd":131,"githubUrl":"https://github.com/octobercms/october/blob/b608633a7e8922487d91a8161499020121c3b3bf/modules/backend/formwidgets/datatable/LegacyDataTable.php#L95-L131","documentation":"Error \"Model ':class' does not contain a method ':method'.\" thrown in octobercms/october.","triggerScenarios":"Thrown at modules/backend/formwidgets/datatable/LegacyDataTable.php:113 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"}