{"record":{"id":"8f560036fc35aaef","repo":"octobercms/october","slug":"list-behavior-used-in-class-does-not-have-a-model","errorCode":null,"errorMessage":"List behavior used in :class does not have a model defined.","messagePattern":"List behavior used in :class does not have a model defined\\.","errorType":"exception","errorClass":"ApplicationException","httpStatus":null,"severity":"error","filePath":"modules/backend/widgets/Lists.php","lineNumber":360,"sourceCode":"    }\n\n    /**\n     * onFilter event handler for changing the filter\n     */\n    public function onFilter()\n    {\n        $this->currentPageNumber = 1;\n\n        return $this->onRefresh();\n    }\n\n    /**\n     * validateModel is present and right class type\n     */\n    protected function validateModel()\n    {\n        if (!$this->model) {\n            throw new ApplicationException(Lang::get(\n                'backend::lang.list.missing_model',\n                ['class'=>get_class($this->controller)]\n            ));\n        }\n\n        if (!$this->model instanceof Model) {\n            throw new ApplicationException(Lang::get(\n                'backend::lang.model.invalid_class',\n                ['model'=>get_class($this->model), 'class'=>get_class($this->controller)]\n            ));\n        }\n\n        return $this->model;\n    }\n\n    /**\n     * parseTableName replaces the @ symbol with a table name in a model\n     * @param  string $sql","sourceCodeStart":342,"sourceCodeEnd":378,"githubUrl":"https://github.com/octobercms/october/blob/b608633a7e8922487d91a8161499020121c3b3bf/modules/backend/widgets/Lists.php#L342-L378","documentation":"validateModel guard in the Lists widget (called from init): before preparing the list it verifies that a model was bound. An empty model property means the controller's list configuration did not resolve a model (missing model in config or an unresolved record), so column definitions and queries cannot proceed. The placeholder :class names the controller for context.","triggerScenarios":"Thrown at modules/backend/widgets/Lists.php:360 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Supply a valid model in the list configuration (modelClass or an injected model instance)","Ensure the controller's list behavior config is loaded and the model class can be instantiated"],"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"}